diff --git a/administrator/components/com_postinstall/src/View/Messages/HtmlView.php b/administrator/components/com_postinstall/src/View/Messages/HtmlView.php index ae83c9efcc7a2..4ff2debc1ea11 100644 --- a/administrator/components/com_postinstall/src/View/Messages/HtmlView.php +++ b/administrator/components/com_postinstall/src/View/Messages/HtmlView.php @@ -14,6 +14,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView; +use Joomla\CMS\Toolbar\Toolbar; use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\Component\Postinstall\Administrator\Model\MessagesModel; @@ -67,16 +68,18 @@ public function display($tpl = null) */ private function toolbar() { + $toolbar = Toolbar::getInstance('toolbar'); + if (!empty($this->items)) { - ToolbarHelper::custom('message.hideAll', 'unpublish.png', 'unpublish_f2.png', 'COM_POSTINSTALL_HIDE_ALL_MESSAGES', false); + $toolbar->unpublish('message.hideAll', 'COM_POSTINSTALL_HIDE_ALL_MESSAGES'); } // Options button. if (Factory::getUser()->authorise('core.admin', 'com_postinstall')) { - ToolbarHelper::preferences('com_postinstall', 550, 875); - ToolbarHelper::help('JHELP_COMPONENTS_POST_INSTALLATION_MESSAGES'); + $toolbar->preferences('com_postinstall'); + $toolbar->help('JHELP_COMPONENTS_POST_INSTALLATION_MESSAGES'); } } }