Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Rules.php
Go to the documentation of this file.
1 <?php
8 
26 {
36  public function __construct(
37  \Magento\Framework\Model\Context $context,
38  \Magento\Framework\Registry $registry,
39  \Magento\Authorization\Model\ResourceModel\Rules $resource,
40  \Magento\Authorization\Model\ResourceModel\Rules\Collection $resourceCollection,
41  array $data = []
42  ) {
43  parent::__construct($context, $registry, $resource, $resourceCollection, $data);
44  }
45 
51  protected function _construct()
52  {
53  $this->_init(\Magento\Authorization\Model\ResourceModel\Rules::class);
54  }
55 
59  public function update()
60  {
61  $this->getResource()->update($this);
62  return $this;
63  }
64 
68  public function saveRel()
69  {
70  $this->getResource()->saveRel($this);
71  return $this;
72  }
73 }
__construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Authorization\Model\ResourceModel\Rules $resource, \Magento\Authorization\Model\ResourceModel\Rules\Collection $resourceCollection, array $data=[])
Definition: Rules.php:36
$resource
Definition: bulk.php:12