示例#1
0
 /**
  * {@inheritdoc}
  */
 protected function _prepareColumns()
 {
     $this->addColumn('increment_id', ['header' => __('Order'), 'width' => '100', 'index' => 'increment_id']);
     $this->addColumn('created_at', ['header' => __('Purchased'), 'index' => 'created_at', 'type' => 'datetime']);
     $this->addColumn('billing_name', ['header' => __('Bill-to Name'), 'index' => 'billing_name']);
     $this->addColumn('shipping_name', ['header' => __('Ship-to Name'), 'index' => 'shipping_name']);
     $this->addColumn('grand_total', ['header' => __('Order Total'), 'index' => 'grand_total', 'type' => 'currency', 'currency' => 'order_currency_code']);
     if (!$this->_storeManager->isSingleStoreMode()) {
         $this->addColumn('store_id', ['header' => __('Purchase Point'), 'index' => 'store_id', 'type' => 'store', 'store_view' => true]);
     }
     if ($this->_salesReorder->isAllow()) {
         $this->addColumn('action', ['header' => ' ', 'filter' => false, 'sortable' => false, 'width' => '100px', 'renderer' => 'Magento\\Sales\\Block\\Adminhtml\\Reorder\\Renderer\\Action']);
     }
     return parent::_prepareColumns();
 }
 /**
  * Tests that the store config is still checked with a null store.
  *
  * @dataProvider getScopeConfigValue
  * @return void
  */
 public function testIsAllowScopeConfigReorderNotAllowWithStore($scopeConfigValue)
 {
     $this->storeParam = null;
     $this->setupScopeConfigMock($scopeConfigValue);
     $this->assertEquals($scopeConfigValue, $this->helper->isAllow());
 }