Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Collection.php
Go to the documentation of this file.
1 <?php
7 
9 {
16  public function __construct(
17  \Magento\Framework\View\Asset\Repository $assetRepo,
18  \Magento\Framework\View\LayoutInterface $layout,
19  \Magento\Rule\Model\ActionFactory $actionFactory,
20  array $data = []
21  ) {
22  parent::__construct($assetRepo, $layout, $actionFactory, $data);
23  $this->setType(\Magento\SalesRule\Model\Rule\Action\Collection::class);
24  }
25 
29  public function getNewChildSelectOptions()
30  {
31  $actions = parent::getNewChildSelectOptions();
32  $actions = array_merge_recursive(
33  $actions,
34  [['value' => \Magento\SalesRule\Model\Rule\Action\Product::class, 'label' => __('Update the Product')]]
35  );
36  return $actions;
37  }
38 }
__construct(\Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\View\LayoutInterface $layout, \Magento\Rule\Model\ActionFactory $actionFactory, array $data=[])
Definition: Collection.php:16
__()
Definition: __.php:13