class AdminController extends ControllerAdmin { public function initPageHeaderToolbar() { $this->page_header_toolbar_btn['custom'] = [ 'href' => $this->context->link->getAdminLink('AdminCustomController'), 'desc' => $this->l('Custom Button'), 'icon' => 'process-icon-refresh', ]; } }
class AdminController extends BackController { public function initPageHeaderToolbar() { parent::initPageHeaderToolbar(); $this->addToolBarLink([ 'href' => $this->context->link->getAdminLink('AdminCatalog'), 'desc' => $this->l('Catalog'), 'icon' => 'icon-folder-close', ]); } }In this example, the `initPageHeaderToolbar` method is used to add a link to the header toolbar of the admin pages. When the link is clicked, it will redirect the user to the `AdminCatalog` page. The `desc` parameter is used to specify the text that will be displayed for the link, while the `icon` parameter is used to specify the icon that will be displayed next to the link. Package/library: Symfony Overall, the `initPageHeaderToolbar` method is a useful tool that can be used to customize the header toolbar of admin pages in PHP applications. Its exact implementation may differ depending on the specific framework or library being used.