Skip to content

Commit 3d5a9aa

Browse files
authored
Display quickicons only for active components (#40715)
1 parent ae2a409 commit 3d5a9aa

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

administrator/modules/mod_quickicon/src/Helper/QuickIconHelper.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
namespace Joomla\Module\Quickicon\Administrator\Helper;
1212

1313
use Joomla\CMS\Application\CMSApplication;
14+
use Joomla\CMS\Component\ComponentHelper;
1415
use Joomla\CMS\Factory;
1516
use Joomla\CMS\Plugin\PluginHelper;
1617
use Joomla\CMS\Router\Route;
@@ -115,7 +116,7 @@ public function getButtons(Registry $params, CMSApplication $application = null)
115116
$this->buttons[$key][] = $tmp;
116117
}
117118

118-
if ($params->get('show_tags')) {
119+
if (ComponentHelper::isEnabled('com_tags') && $params->get('show_tags')) {
119120
$tmp = [
120121
'image' => 'icon-tag',
121122
'link' => Route::_('index.php?option=com_tags&view=tags'),
@@ -281,7 +282,7 @@ public function getButtons(Registry $params, CMSApplication $application = null)
281282
];
282283
}
283284

284-
if ($params->get('show_banners')) {
285+
if (ComponentHelper::isEnabled('com_banners') && $params->get('show_banners')) {
285286
$tmp = [
286287
'image' => 'icon-bookmark banners',
287288
'link' => Route::_('index.php?option=com_banners&view=banners'),
@@ -298,7 +299,7 @@ public function getButtons(Registry $params, CMSApplication $application = null)
298299
$this->buttons[$key][] = $tmp;
299300
}
300301

301-
if ($params->get('show_contact')) {
302+
if (ComponentHelper::isEnabled('com_contacts') && $params->get('show_contact')) {
302303
$tmp = [
303304
'image' => 'icon-address-book contact',
304305
'link' => Route::_('index.php?option=com_contact&view=contacts'),
@@ -315,7 +316,7 @@ public function getButtons(Registry $params, CMSApplication $application = null)
315316
$this->buttons[$key][] = $tmp;
316317
}
317318

318-
if ($params->get('show_newsfeeds')) {
319+
if (ComponentHelper::isEnabled('com_newsfeeds') && $params->get('show_newsfeeds')) {
319320
$tmp = [
320321
'image' => 'icon-rss newsfeeds',
321322
'link' => Route::_('index.php?option=com_newsfeeds&view=newsfeeds'),
@@ -332,7 +333,7 @@ public function getButtons(Registry $params, CMSApplication $application = null)
332333
$this->buttons[$key][] = $tmp;
333334
}
334335

335-
if ($params->get('show_redirect')) {
336+
if (ComponentHelper::isEnabled('com_redirect') && $params->get('show_redirect')) {
336337
$this->buttons[$key][] = [
337338
'image' => 'icon-map-signs redirect',
338339
'link' => Route::_('index.php?option=com_redirect&view=links'),
@@ -343,7 +344,7 @@ public function getButtons(Registry $params, CMSApplication $application = null)
343344
];
344345
}
345346

346-
if ($params->get('show_associations')) {
347+
if (ComponentHelper::isEnabled('com_associations') && $params->get('show_associations')) {
347348
$this->buttons[$key][] = [
348349
'image' => 'icon-language',
349350
'link' => Route::_('index.php?option=com_associations&view=associations'),
@@ -353,7 +354,7 @@ public function getButtons(Registry $params, CMSApplication $application = null)
353354
];
354355
}
355356

356-
if ($params->get('show_finder')) {
357+
if (ComponentHelper::isEnabled('com_finder') && $params->get('show_finder')) {
357358
$this->buttons[$key][] = [
358359
'image' => 'icon-search-plus finder',
359360
'link' => Route::_('index.php?option=com_finder&view=index'),

0 commit comments

Comments
 (0)