Exemplo n.º 1
0
 /**
  * Define block template
  *
  * @return void
  */
 protected function _construct()
 {
     if (!$this->hasTemplate()) {
         $this->setTemplate('Magento_Backend::widget/button/split.phtml');
     }
     parent::_construct();
 }
Exemplo n.º 2
0
 /**
  * @return void
  */
 public function _construct()
 {
     if ($this->hasData('grouped')) {
         $this->_isGrouped = (bool) $this->getData('grouped');
     }
     parent::_construct();
 }
Exemplo n.º 3
0
 /**
  * Initialize block
  *
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->setProductId($this->getRequest()->getParam('id'));
     $this->setId('config_super_product');
     $this->setCanEditPrice(true);
     $this->setCanReadPrice(true);
 }
Exemplo n.º 4
0
 /**
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->setId($this->getId() . '_Uploader');
     $uploadUrl = $this->_urlBuilder->addSessionParam()->getUrl('adminhtml/*/upload');
     $this->getConfig()->setUrl($uploadUrl);
     $this->getConfig()->setParams(['form_key' => $this->getFormKey()]);
     $this->getConfig()->setFileField('file');
     $this->getConfig()->setFilters(['images' => ['label' => __('Images (.gif, .jpg, .png)'), 'files' => ['*.gif', '*.jpg', '*.png']], 'media' => ['label' => __('Media (.avi, .flv, .swf)'), 'files' => ['*.avi', '*.flv', '*.swf']], 'all' => ['label' => __('All Files'), 'files' => ['*.*']]]);
 }
Exemplo n.º 5
0
 /**
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->setErrorText($this->escapeJsQuote(__('Please select items.')));
     if (null !== $this->getOptions()) {
         foreach ($this->getOptions() as $optionId => $option) {
             $this->addItem($optionId, $option);
         }
         $this->unsetData('options');
     }
 }
Exemplo n.º 6
0
 /**
  * @return void
  * @throws \Magento\Framework\Model\Exception
  */
 protected function _construct()
 {
     parent::_construct();
     if ($this->hasData('exportTypes')) {
         foreach ($this->getData('exportTypes') as $type) {
             if (!isset($type['urlPath']) || !isset($type['label'])) {
                 throw new \Magento\Framework\Model\Exception('Invalid export type supplied for grid export block');
             }
             $this->addExportType($type['urlPath'], $type['label']);
         }
     }
     $this->_directory = $this->_filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::VAR_DIR);
 }
Exemplo n.º 7
0
 /**
  * Sets Massaction template
  *
  * @return void
  */
 public function _construct()
 {
     parent::_construct();
     $this->setErrorText($this->escapeJsQuote(__('Please select items.')));
 }
Exemplo n.º 8
0
 /**
  * Define block template
  *
  * @return void
  */
 protected function _construct()
 {
     $this->setTemplate('Magento_Backend::widget/button.phtml');
     parent::_construct();
 }
Exemplo n.º 9
0
 /**
  * Class constructor
  *
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->setDestElementId('edit_form');
     $this->setShowGlobalIcon(false);
 }
Exemplo n.º 10
0
 /**
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->setId('product_edit');
     $this->setUseContainer(true);
 }
Exemplo n.º 11
0
 /**
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->setId('design_edit');
 }
Exemplo n.º 12
0
 /**
  * Constructor
  *
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->setId('sales_order_create_newsletter_form');
 }
Exemplo n.º 13
0
 /**
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     if (!$this->getRowClickCallback()) {
         $this->setRowClickCallback('openGridRow');
     }
     if ($this->hasData('id')) {
         $this->setId($this->getData('id'));
     }
     if ($this->hasData('default_sort')) {
         $this->setDefaultSort($this->getData('default_sort'));
     }
     if ($this->hasData('default_dir')) {
         $this->setDefaultDir($this->getData('default_dir'));
     }
     if ($this->hasData('save_parameters_in_session')) {
         $this->setSaveParametersInSession($this->getData('save_parameters_in_session'));
     }
     $this->setPagerVisibility($this->hasData('pager_visibility') ? (bool) $this->getData('pager_visibility') : true);
     $this->setData('use_ajax', $this->hasData('use_ajax') ? (bool) $this->getData('use_ajax') : false);
     if ($this->hasData('rssList') && is_array($this->getData('rssList'))) {
         foreach ($this->getData('rssList') as $item) {
             $this->addRssList($item['url'], $item['label']);
         }
     }
 }
Exemplo n.º 14
0
 /**
  * @return void
  * @SuppressWarnings(PHPMD.NPathComplexity)
  */
 protected function _construct()
 {
     parent::_construct();
     if (!$this->getRowClickCallback()) {
         $this->setRowClickCallback('openGridRow');
     }
     if ($this->hasData('id')) {
         $this->setId($this->getData('id'));
     }
     if ($this->hasData('default_sort')) {
         $this->setDefaultSort($this->getData('default_sort'));
     }
     if ($this->hasData('default_dir')) {
         $this->setDefaultDir($this->getData('default_dir'));
     }
     if ($this->hasData('save_parameters_in_session')) {
         $this->setSaveParametersInSession($this->getData('save_parameters_in_session'));
     }
     $this->setPagerVisibility($this->hasData('pager_visibility') ? (bool) $this->getData('pager_visibility') : true);
     $this->setData('use_ajax', $this->hasData('use_ajax') ? (bool) $this->getData('use_ajax') : false);
 }
Exemplo n.º 15
0
 /**
  * Define block template
  *
  * @return void
  */
 protected function _construct()
 {
     $this->setTemplate('Magento_Catalog::product/edit/attribute/search.phtml');
     parent::_construct();
 }
Exemplo n.º 16
0
 /**
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->setTitle('Cache Management');
 }
Exemplo n.º 17
0
 /**
  * Class constructor
  *
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->setCanReadPrice(true);
     $this->setCanEditPrice(true);
 }