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


PHP Field::_construct方法代碼示例

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


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

示例1: _construct

 /**
  * Check if columns are defined, set template
  *
  * @return void
  */
 protected function _construct()
 {
     if (!$this->_addButtonLabel) {
         $this->_addButtonLabel = __('Add');
     }
     parent::_construct();
 }
開發者ID:pradeep-wagento,項目名稱:magento2,代碼行數:12,代碼來源:AbstractFieldArray.php

示例2: _construct

 /**
  * Define params and variables
  *
  * @return void
  */
 public function _construct()
 {
     parent::_construct();
     $this->setInch($this->carrierDhl->getCode('unit_of_dimension_cut', 'I'));
     $this->setCm($this->carrierDhl->getCode('unit_of_dimension_cut', 'C'));
     $this->setHeight($this->carrierDhl->getCode('dimensions', 'height'));
     $this->setDepth($this->carrierDhl->getCode('dimensions', 'depth'));
     $this->setWidth($this->carrierDhl->getCode('dimensions', 'width'));
     $kgWeight = 70;
     $this->setDivideOrderWeightNoteKg(__('Select this to allow DHL to optimize shipping charges by splitting the order if it exceeds %1 %2.', $kgWeight, 'kg'));
     $weight = round($this->carrierHelper->convertMeasureWeight($kgWeight, \Zend_Measure_Weight::KILOGRAM, \Zend_Measure_Weight::POUND), 3);
     $this->setDivideOrderWeightNoteLbp(__('Select this to allow DHL to optimize shipping charges by splitting the order if it exceeds %1 %2.', $weight, 'pounds'));
     $this->setTemplate('unitofmeasure.phtml');
 }
開發者ID:kidaa30,項目名稱:magento2-platformsh,代碼行數:19,代碼來源:Unitofmeasure.php

示例3: _construct

 /**
  * Define params and variables
  *
  * @return void
  */
 public function _construct()
 {
     parent::_construct();
     $carrierModel = $this->carrierDhl;
     $this->setInch($this->escapeJsQuote($carrierModel->getCode('unit_of_dimension_cut', 'I')));
     $this->setCm($this->escapeJsQuote($carrierModel->getCode('unit_of_dimension_cut', 'C')));
     $this->setHeight($this->escapeJsQuote($carrierModel->getCode('dimensions', 'height')));
     $this->setDepth($this->escapeJsQuote($carrierModel->getCode('dimensions', 'depth')));
     $this->setWidth($this->escapeJsQuote($carrierModel->getCode('dimensions', 'width')));
     $kgWeight = 70;
     $this->setDivideOrderWeightNoteKg($this->escapeJsQuote(__('This allows breaking total order weight into smaller pieces if it exceeds %1 %2 to ensure accurate calculation of shipping charges.', $kgWeight, 'kg')));
     $weight = round($this->_carrierHelper->convertMeasureWeight($kgWeight, \Zend_Measure_Weight::KILOGRAM, \Zend_Measure_Weight::POUND), 3);
     $this->setDivideOrderWeightNoteLbp($this->escapeJsQuote(__('This allows breaking total order weight into smaller pieces if it exceeds %1 %2 to ensure accurate calculation of shipping charges.', $weight, 'pounds')));
     $this->setTemplate('unitofmeasure.phtml');
 }
開發者ID:shabbirvividads,項目名稱:magento2,代碼行數:20,代碼來源:Unitofmeasure.php

示例4: _construct

 /**
  * Set template
  *
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->setTemplate('MagePal_GmailSmtpApp::system/config/testbutton.phtml');
 }
開發者ID:dragonsword007008,項目名稱:magento2,代碼行數:10,代碼來源:TestButton.php


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