本文整理汇总了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();
}
示例2: _construct
/**
* @return void
*/
public function _construct()
{
if ($this->hasData('grouped')) {
$this->_isGrouped = (bool) $this->getData('grouped');
}
parent::_construct();
}
示例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);
}
示例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' => ['*.*']]]);
}
示例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');
}
}
示例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);
}
示例7: _construct
/**
* Sets Massaction template
*
* @return void
*/
public function _construct()
{
parent::_construct();
$this->setErrorText($this->escapeJsQuote(__('Please select items.')));
}
示例8: _construct
/**
* Define block template
*
* @return void
*/
protected function _construct()
{
$this->setTemplate('Magento_Backend::widget/button.phtml');
parent::_construct();
}
示例9: _construct
/**
* Class constructor
*
* @return void
*/
protected function _construct()
{
parent::_construct();
$this->setDestElementId('edit_form');
$this->setShowGlobalIcon(false);
}
示例10: _construct
/**
* @return void
*/
protected function _construct()
{
parent::_construct();
$this->setId('product_edit');
$this->setUseContainer(true);
}
示例11: _construct
/**
* @return void
*/
protected function _construct()
{
parent::_construct();
$this->setId('design_edit');
}
示例12: _construct
/**
* Constructor
*
* @return void
*/
protected function _construct()
{
parent::_construct();
$this->setId('sales_order_create_newsletter_form');
}
示例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']);
}
}
}
示例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);
}
示例15: _construct
/**
* @return void
*/
protected function _construct()
{
parent::_construct();
$this->setTitle('Cache Management');
}