当前位置: 首页>>代码示例>>PHP>>正文


PHP Widget::_construct方法代码示例

本文整理汇总了PHP中Magento\Backend\Block\Widget::_construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Widget::_construct方法的具体用法?PHP Widget::_construct怎么用?PHP Widget::_construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Magento\Backend\Block\Widget的用法示例。


在下文中一共展示了Widget::_construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _construct

 /**
  * Define block template
  *
  * @return void
  */
 protected function _construct()
 {
     if (!$this->hasTemplate()) {
         $this->setTemplate('Magento_Backend::widget/button/split.phtml');
     }
     parent::_construct();
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:12,代码来源:SplitButton.php

示例2: _construct

 /**
  * @return void
  */
 public function _construct()
 {
     if ($this->hasData('grouped')) {
         $this->_isGrouped = (bool) $this->getData('grouped');
     }
     parent::_construct();
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:10,代码来源:Column.php

示例3: _construct

 /**
  * 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);
 }
开发者ID:Doability,项目名称:magento2dev,代码行数:13,代码来源:Config.php

示例4: _construct

 /**
  * @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' => ['*.*']]]);
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:13,代码来源:Uploader.php

示例5: _construct

 /**
  * @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');
     }
 }
开发者ID:aiesh,项目名称:magento2,代码行数:14,代码来源:AbstractMassaction.php

示例6: _construct

 /**
  * @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);
 }
开发者ID:aiesh,项目名称:magento2,代码行数:17,代码来源:Export.php

示例7: _construct

 /**
  * Sets Massaction template
  *
  * @return void
  */
 public function _construct()
 {
     parent::_construct();
     $this->setErrorText($this->escapeJsQuote(__('Please select items.')));
 }
开发者ID:aiesh,项目名称:magento2,代码行数:10,代码来源:Extended.php

示例8: _construct

 /**
  * Define block template
  *
  * @return void
  */
 protected function _construct()
 {
     $this->setTemplate('Magento_Backend::widget/button.phtml');
     parent::_construct();
 }
开发者ID:aiesh,项目名称:magento2,代码行数:10,代码来源:Button.php

示例9: _construct

 /**
  * Class constructor
  *
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->setDestElementId('edit_form');
     $this->setShowGlobalIcon(false);
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:11,代码来源:Form.php

示例10: _construct

 /**
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->setId('product_edit');
     $this->setUseContainer(true);
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:9,代码来源:Edit.php

示例11: _construct

 /**
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->setId('design_edit');
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:8,代码来源:Edit.php

示例12: _construct

 /**
  * Constructor
  *
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->setId('sales_order_create_newsletter_form');
 }
开发者ID:tingyeeh,项目名称:magento2,代码行数:10,代码来源:Form.php

示例13: _construct

 /**
  * @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']);
         }
     }
 }
开发者ID:aiesh,项目名称:magento2,代码行数:29,代码来源:Grid.php

示例14: _construct

 /**
  * @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);
 }
开发者ID:opexsw,项目名称:magento2,代码行数:25,代码来源:Grid.php

示例15: _construct

 /**
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->setTitle('Cache Management');
 }
开发者ID:aiesh,项目名称:magento2,代码行数:8,代码来源:Edit.php


注:本文中的Magento\Backend\Block\Widget::_construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。