Show Associations button on edit screen

This commit is contained in:
Tuan Pham Ngoc 2021-08-15 11:46:40 +07:00
parent 4372ed85aa
commit 4274af68e3
1 changed files with 6 additions and 0 deletions

View File

@ -14,6 +14,7 @@ defined('_JEXEC') or die;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
@ -163,6 +164,11 @@ class HtmlView extends BaseHtmlView
{
ToolbarHelper::versions('com_weblinks.weblink', $this->item->id);
}
if (Associations::isEnabled() && ComponentHelper::isEnabled('com_associations'))
{
ToolbarHelper::custom('weblink.editAssociations', 'contract', '', 'JTOOLBAR_ASSOCIATIONS', false, false);
}
}
}
}