Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Rule.php
Go to the documentation of this file.
1 <?php
7 
10 
18 {
22  protected $conditionsFactory;
23 
41  public function __construct(
42  \Magento\Framework\Model\Context $context,
43  \Magento\Framework\Registry $registry,
44  \Magento\Framework\Data\FormFactory $formFactory,
45  \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate,
46  \Magento\CatalogWidget\Model\Rule\Condition\CombineFactory $conditionsFactory,
47  \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
48  \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
49  array $data = [],
50  ExtensionAttributesFactory $extensionFactory = null,
52  \Magento\Framework\Serialize\Serializer\Json $serializer = null
53  ) {
54  $this->conditionsFactory = $conditionsFactory;
55  parent::__construct(
56  $context,
57  $registry,
58  $formFactory,
59  $localeDate,
60  $resource,
61  $resourceCollection,
62  $data,
63  $extensionFactory,
66  );
67  }
68 
72  public function getConditionsInstance()
73  {
74  return $this->conditionsFactory->create();
75  }
76 
80  public function getActionsInstance()
81  {
82  return null;
83  }
84 }
$resource
Definition: bulk.php:12
__construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Data\FormFactory $formFactory, \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\CatalogWidget\Model\Rule\Condition\CombineFactory $conditionsFactory, \Magento\Framework\Model\ResourceModel\AbstractResource $resource=null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection=null, array $data=[], ExtensionAttributesFactory $extensionFactory=null, AttributeValueFactory $customAttributeFactory=null, \Magento\Framework\Serialize\Serializer\Json $serializer=null)
Definition: Rule.php:41