![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/mageworx/module-seoxtemplates/Block/Adminhtml/Template/Brand/ |
<?php /** * Copyright © MageWorx. All rights reserved. * See LICENSE.txt for license details. */ namespace MageWorx\SeoXTemplates\Block\Adminhtml\Template\Brand; use Magento\Backend\Block\Widget\Form\Container as FormContainer; use Magento\Backend\Block\Widget\Context; use Magento\Framework\Registry; class Edit extends FormContainer { /** * Core registry * * @var \Magento\Framework\Registry */ protected $coreRegistry = null; /** * Constructor * * @param Context $context * @param Registry $registry * @param array $data */ public function __construct( Context $context, Registry $registry, array $data = [] ) { $this->coreRegistry = $registry; parent::__construct($context, $data); } /** * Initialize template edit block * * @return void */ protected function _construct() { $this->_objectId = 'template_id'; $this->_blockGroup = 'MageWorx_SeoXTemplates'; $this->_controller = 'adminhtml_template_brand'; parent::_construct(); $this->buttonList->update('save', 'label', __('Save Brand Page Template')); } /** * Retrieve text for header element depending on loaded template * * @return string */ public function getHeaderText() { /** @var \MageWorx\SeoXTemplates\Model\Template\Brand $template */ $temlate = $this->coreRegistry->registry('mageworx_seoxtemplates_template'); if ($temlate && $temlate->getId()) { return __("Edit Brand Page Template '%1'", $this->escapeHtml($temlate->getName())); } return __('New Template'); } }