本文整理汇总了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();
}
示例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');
}
示例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');
}
示例4: _construct
/**
* Set template
*
* @return void
*/
protected function _construct()
{
parent::_construct();
$this->setTemplate('MagePal_GmailSmtpApp::system/config/testbutton.phtml');
}