Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Store.php
Go to the documentation of this file.
1 <?php
7 
16 class Store extends \Magento\Backend\Block\Widget\Grid\Container
17 {
21  protected $_blockGroup = 'Magento_Backend';
22 
26  protected function _construct()
27  {
28  $this->_blockGroup = 'Magento_Backend';
29  $this->_controller = 'system_store';
30  $this->_headerText = __('Stores');
31  parent::_construct();
32 
33  /* Update default add button to add website button */
34  $this->buttonList->update('add', 'label', __('Create Website'));
35  $this->buttonList->update('add', 'onclick', "setLocation('" . $this->getUrl('adminhtml/*/newWebsite') . "')");
36 
37  /* Add Store Group button */
38  $this->buttonList->add(
39  'add_group',
40  [
41  'label' => __('Create Store'),
42  'onclick' => 'setLocation(\'' . $this->getUrl('adminhtml/*/newGroup') . '\')',
43  'class' => 'add add-store'
44  ],
45  1
46  );
47 
48  /* Add Store button */
49  $this->buttonList->add(
50  'add_store',
51  [
52  'label' => __('Create Store View'),
53  'onclick' => 'setLocation(\'' . $this->getUrl('adminhtml/*/newStore') . '\')',
54  'class' => 'add add-store-view'
55  ]
56  );
57  }
58 }
__()
Definition: __.php:13