當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。