當前位置: 首頁>>代碼示例>>PHP>>正文


PHP AbstractElement::__construct方法代碼示例

本文整理匯總了PHP中Magento\Framework\Data\Form\Element\AbstractElement::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP AbstractElement::__construct方法的具體用法?PHP AbstractElement::__construct怎麽用?PHP AbstractElement::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Magento\Framework\Data\Form\Element\AbstractElement的用法示例。


在下文中一共展示了AbstractElement::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * @param \Magento\Framework\Data\Form\Element\Factory $factoryElement
  * @param \Magento\Framework\Data\Form\Element\CollectionFactory $factoryCollection
  * @param \Magento\Framework\Escaper $escaper
  * @param \Magento\Backend\Helper\Data $adminhtmlData
  * @param \Magento\Framework\View\Asset\Repository $assetRepo
  * @param array $data
  */
 public function __construct(\Magento\Framework\Data\Form\Element\Factory $factoryElement, \Magento\Framework\Data\Form\Element\CollectionFactory $factoryCollection, \Magento\Framework\Escaper $escaper, \Magento\Backend\Helper\Data $adminhtmlData, \Magento\Framework\View\Asset\Repository $assetRepo, $data = array())
 {
     $this->_adminhtmlData = $adminhtmlData;
     $this->_assetRepo = $assetRepo;
     parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
     $this->setType('file');
 }
開發者ID:aiesh,項目名稱:magento2,代碼行數:15,代碼來源:File.php

示例2: __construct

 /**
  * @param Factory $factoryElement
  * @param CollectionFactory $factoryCollection
  * @param Escaper $escaper
  * @param array $data
  */
 public function __construct(Factory $factoryElement, CollectionFactory $factoryCollection, Escaper $escaper, $data = array())
 {
     parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
     $this->setType('select');
     $this->setExtType('multiple');
     $this->setSize(10);
 }
開發者ID:,項目名稱:,代碼行數:13,代碼來源:

示例3: __construct

 /**
  * @param Factory $factoryElement
  * @param CollectionFactory $factoryCollection
  * @param Escaper $escaper
  * @param array $data
  */
 public function __construct(Factory $factoryElement, CollectionFactory $factoryCollection, Escaper $escaper, $data = [])
 {
     parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
     $this->setType('select');
     $this->setExtType('combobox');
     $this->_prepareOptions();
 }
開發者ID:shabbirvividads,項目名稱:magento2,代碼行數:13,代碼來源:Select.php

示例4: __construct

 /**
  * @param \Magento\Framework\Data\Form\Element\Factory $factoryElement
  * @param \Magento\Framework\Data\Form\Element\CollectionFactory $factoryCollection
  * @param \Magento\Framework\Escaper $escaper
  * @param array $data
  */
 public function __construct(\Magento\Framework\Data\Form\Element\Factory $factoryElement, \Magento\Framework\Data\Form\Element\CollectionFactory $factoryCollection, \Magento\Framework\Escaper $escaper, $data = [])
 {
     parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
     $this->setType('file');
     $this->setExtType('imagefile');
     $this->setAutosubmit(false);
     $this->setData('autoSubmit', false);
 }
開發者ID:kidaa30,項目名稱:magento2-platformsh,代碼行數:14,代碼來源:Imagefile.php

示例5: __construct

 /**
  * @param \Magento\Framework\Data\Form\Element\Factory $factoryElement
  * @param \Magento\Framework\Data\Form\Element\CollectionFactory $factoryCollection
  * @param \Magento\Framework\Escaper $escaper
  * @param \Magento\Framework\View\Asset\Repository $assetRepo
  * @param \Magento\Backend\Model\UrlFactory $backendUrlFactory
  * @param \Magento\Catalog\Helper\Data $catalogData
  * @param \Magento\Framework\File\Size $fileConfig
  * @param array $data
  */
 public function __construct(\Magento\Framework\Data\Form\Element\Factory $factoryElement, \Magento\Framework\Data\Form\Element\CollectionFactory $factoryCollection, \Magento\Framework\Escaper $escaper, \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Backend\Model\UrlFactory $backendUrlFactory, \Magento\Catalog\Helper\Data $catalogData, \Magento\Framework\File\Size $fileConfig, array $data = array())
 {
     parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
     $this->_assetRepo = $assetRepo;
     $this->_url = $backendUrlFactory->create();
     $this->_catalogHelperData = $catalogData;
     $this->_fileConfig = $fileConfig;
     $this->_maxFileSize = $this->_getFileMaxSize();
 }
開發者ID:aiesh,項目名稱:magento2,代碼行數:19,代碼來源:BaseImage.php

示例6: __construct

 /**
  * @param Factory $factoryElement
  * @param CollectionFactory $factoryCollection
  * @param Escaper $escaper
  * @param array $data
  */
 public function __construct(Factory $factoryElement, CollectionFactory $factoryCollection, Escaper $escaper, $data = [])
 {
     parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
     $this->_renderer = Form::getFieldsetRenderer();
     $this->setType('fieldset');
     if (isset($data['advancedSection'])) {
         $this->setAdvancedLabel($data['advancedSection']);
     }
 }
開發者ID:IlyaGluschenko,項目名稱:protection,代碼行數:15,代碼來源:Fieldset.php

示例7: __construct

 /**
  * @param Factory $factoryElement
  * @param CollectionFactory $factoryCollection
  * @param Escaper $escaper
  * @param TimezoneInterface $localeDate
  * @param array $data
  */
 public function __construct(Factory $factoryElement, CollectionFactory $factoryCollection, Escaper $escaper, TimezoneInterface $localeDate, $data = [])
 {
     $this->localeDate = $localeDate;
     parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
     $this->setType('text');
     $this->setExtType('textfield');
     if (isset($data['value'])) {
         $this->setValue($data['value']);
     }
 }
開發者ID:IlyaGluschenko,項目名稱:test001,代碼行數:17,代碼來源:Date.php

示例8: __construct

 /**
  * @param Factory $factoryElement
  * @param CollectionFactory $factoryCollection
  * @param Escaper $escaper
  * @param array $data
  */
 public function __construct(Factory $factoryElement, CollectionFactory $factoryCollection, Escaper $escaper, $data = [])
 {
     parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
     $this->setType('textarea');
     $this->setExtType('textarea');
     if (!$this->getRows()) {
         $this->setRows(self::DEFAULT_ROWS);
     }
     if (!$this->getCols()) {
         $this->setCols(self::DEFAULT_COLS);
     }
 }
開發者ID:nja78,項目名稱:magento2,代碼行數:18,代碼來源:Textarea.php

示例9: __construct

 /**
  * @param \Magento\Framework\Data\Form\Element\Factory $factoryElement
  * @param \Magento\Framework\Data\Form\Element\CollectionFactory $factoryCollection
  * @param \Magento\Framework\Escaper $escaper
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  * @param \Magento\Framework\Locale\CurrencyInterface $localeCurrency
  * @param array $data
  */
 public function __construct(\Magento\Framework\Data\Form\Element\Factory $factoryElement, \Magento\Framework\Data\Form\Element\CollectionFactory $factoryCollection, \Magento\Framework\Escaper $escaper, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\Locale\CurrencyInterface $localeCurrency, array $data = [])
 {
     $this->localeCurrency = $localeCurrency;
     $this->storeManager = $storeManager;
     parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
 }
開發者ID:IlyaGluschenko,項目名稱:protection,代碼行數:14,代碼來源:Tax.php

示例10: __construct

 /**
  * @param \Magento\Framework\Data\Form\Element\Factory $factoryElement
  * @param \Magento\Framework\Data\Form\Element\CollectionFactory $factoryCollection
  * @param \Magento\Framework\Escaper $escaper
  * @param UrlInterface $urlBuilder
  * @param array $data
  */
 public function __construct(\Magento\Framework\Data\Form\Element\Factory $factoryElement, \Magento\Framework\Data\Form\Element\CollectionFactory $factoryCollection, \Magento\Framework\Escaper $escaper, UrlInterface $urlBuilder, $data = [])
 {
     $this->_urlBuilder = $urlBuilder;
     parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
     $this->setType('file');
 }
開發者ID:IlyaGluschenko,項目名稱:test001,代碼行數:13,代碼來源:Image.php

示例11: __construct

 /**
  * @param Factory $factoryElement
  * @param CollectionFactory $factoryCollection
  * @param Escaper $escaper
  * @param array $data
  */
 public function __construct(Factory $factoryElement, CollectionFactory $factoryCollection, Escaper $escaper, $data = [])
 {
     parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
     $this->setType('text');
     $this->setLineCount(2);
 }
開發者ID:pradeep-wagento,項目名稱:magento2,代碼行數:12,代碼來源:Multiline.php

示例12: __construct

 /**
  * @param \Magento\Framework\Data\Form\Element\Factory $factoryElement
  * @param \Magento\Framework\Data\Form\Element\CollectionFactory $factoryCollection
  * @param \Magento\Framework\Escaper $escaper
  * @param \Magento\Catalog\Helper\Product $helper
  * @param \Magento\Framework\Locale\Format $localeFormat
  * @param array $data
  */
 public function __construct(\Magento\Framework\Data\Form\Element\Factory $factoryElement, \Magento\Framework\Data\Form\Element\CollectionFactory $factoryCollection, \Magento\Framework\Escaper $escaper, \Magento\Framework\Locale\Format $localeFormat, array $data = [])
 {
     $this->localeFormat = $localeFormat;
     parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
 }
開發者ID:nja78,項目名稱:magento2,代碼行數:13,代碼來源:Tax.php

示例13: __construct

 public function __construct(\Magento\Framework\View\LayoutInterface $layout, Factory $factoryElement, CollectionFactory $factoryCollection, Escaper $escaper, array $data = [])
 {
     $this->layout = $layout;
     $this->setType('hidden');
     parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
 }
開發者ID:Doability,項目名稱:magento2dev,代碼行數:6,代碼來源:Messages.php

示例14: __construct

 /**
  * @param \Magento\Framework\Data\Form\Element\Factory $factoryElement
  * @param \Magento\Framework\Data\Form\Element\CollectionFactory $factoryCollection
  * @param Escaper $escaper
  * @param array $data
  */
 public function __construct(\Magento\Framework\Data\Form\Element\Factory $factoryElement, \Magento\Framework\Data\Form\Element\CollectionFactory $factoryCollection, Escaper $escaper, $data = [])
 {
     parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
     $this->setType('custom_container');
 }
開發者ID:Doability,項目名稱:magento2dev,代碼行數:11,代碼來源:CustomContainer.php

示例15: __construct

 /**
  * @param \Magento\Framework\Data\Form\Element\Factory $factoryElement
  * @param \Magento\Framework\Data\Form\Element\CollectionFactory $factoryCollection
  * @param \Magento\Framework\Escaper $escaper
  * @param \Magento\Framework\View\LayoutInterface $layout
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  * @param array $data
  */
 public function __construct(\Magento\Framework\Data\Form\Element\Factory $factoryElement, \Magento\Framework\Data\Form\Element\CollectionFactory $factoryCollection, \Magento\Framework\Escaper $escaper, \Magento\Framework\View\LayoutInterface $layout, \Magento\Store\Model\StoreManagerInterface $storeManager, $data = array())
 {
     $this->_layout = $layout;
     $this->_storeManager = $storeManager;
     parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
 }
開發者ID:aiesh,項目名稱:magento2,代碼行數:14,代碼來源:Gallery.php


注:本文中的Magento\Framework\Data\Form\Element\AbstractElement::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。