コード例 #1
0
ファイル: Add.php プロジェクト: Doability/magento2dev
 protected function _beforeToHtml()
 {
     $additionalTitle = $this->getRequest()->getParam('current_indexed_xpath');
     $additionalTitle = explode('/', ltrim($additionalTitle, '/'));
     array_shift($additionalTitle);
     $additionalTitle = array_map(function ($el) {
         return preg_replace('/-\\d+/', '', $el);
     }, $additionalTitle);
     $this->setData('additional_title', implode(' > ', $additionalTitle));
     return parent::_beforeToHtml();
 }
コード例 #2
0
ファイル: Mapping.php プロジェクト: Doability/magento2dev
 protected function _beforeToHtml()
 {
     // ---------------------------------------
     $data = array('id' => 'mapping_submit_button', 'label' => $this->__('Confirm'), 'class' => 'mapping_submit_button submit');
     $buttonBlock = $this->createBlock('Magento\\Button')->setData($data);
     $this->setChild('mapping_submit_button', $buttonBlock);
     // ---------------------------------------
     // ---------------------------------------
     $this->setChild('mapping_grid', $this->createBlock('Listing\\Other\\Mapping\\Grid'));
     // ---------------------------------------
     // ---------------------------------------
     $helpBlock = $this->createBlock('HelpBlock')->addData(['content' => $this->__('From the list below you should select a Magento Product to which you would like the Item
              to be linked. Click on Map To This Product link to set accordance.')]);
     $this->setChild('help_block', $helpBlock);
     // ---------------------------------------
     parent::_beforeToHtml();
 }
コード例 #3
0
ファイル: Variations.php プロジェクト: Doability/magento2dev
 protected function _beforeToHtml()
 {
     $this->getChildBlock('grid')->setListingProduct($this->getListingProduct());
     return parent::_beforeToHtml();
 }