Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Grid.php
Go to the documentation of this file.
1 <?php
8 
10 
11 class Grid extends Product
12 {
16  public function execute()
17  {
18  $index = $this->getRequest()->getParam('index');
19  if (!preg_match('/^[a-z0-9_.]*$/i', $index)) {
20  throw new \InvalidArgumentException('Invalid parameter "index"');
21  }
22 
23  return $this->getResponse()->setBody(
24  $this->_view->getLayout()->createBlock(
25  \Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle\Option\Search\Grid::class,
26  'adminhtml.catalog.product.edit.tab.bundle.option.search.grid'
27  )->setIndex($index)->toHtml()
28  );
29  }
30 }
$index
Definition: list.phtml:44