diff --git a/vendor/magento/module-company/Model/Role.php b/vendor/magento/module-company/Model/Role.php index 26ce4918a820..1c1870fa8723 100755 --- a/vendor/magento/module-company/Model/Role.php +++ b/vendor/magento/module-company/Model/Role.php @@ -8,15 +8,7 @@ use Magento\Company\Api\Data\PermissionInterface; use Magento\Company\Api\Data\RoleInterface; -use Magento\Framework\Api\AttributeValueFactory; -use Magento\Framework\Api\ExtensionAttributesFactory; -use Magento\Framework\App\ObjectManager; -use Magento\Framework\Data\Collection\AbstractDb; -use Magento\Framework\MessageQueue\PoisonPill\PoisonPillPutInterface; use Magento\Framework\Model\AbstractExtensibleModel; -use Magento\Framework\Model\Context; -use Magento\Framework\Model\ResourceModel\AbstractResource; -use Magento\Framework\Registry; /** * Role data transfer object. @@ -26,7 +18,7 @@ class Role extends AbstractExtensibleModel implements RoleInterface /** * Cache tag for company role */ - const CACHE_TAG = 'company_role'; + public const CACHE_TAG = 'company_role'; /** * Prefix of model events names. @@ -42,44 +34,6 @@ class Role extends AbstractExtensibleModel implements RoleInterface */ private $permissions = []; - /** - * @var mixed - */ - private $pillPut; - - /** - * @param Context $context - * @param Registry $registry - * @param ExtensionAttributesFactory $extensionFactory - * @param AttributeValueFactory $customAttributeFactory - * @param AbstractResource $resource - * @param AbstractDb|null $resourceCollection - * @param array $data - * @param PoisonPillPutInterface|null $pillPut - */ - public function __construct( - Context $context, - Registry $registry, - ExtensionAttributesFactory $extensionFactory, - AttributeValueFactory $customAttributeFactory, - AbstractResource $resource = null, - AbstractDb $resourceCollection = null, - array $data = [], - PoisonPillPutInterface $pillPut = null - ) { - parent::__construct( - $context, - $registry, - $extensionFactory, - $customAttributeFactory, - $resource, - $resourceCollection, - $data - ); - - $this->pillPut = $pillPut ?: ObjectManager::getInstance()->get(PoisonPillPutInterface::class); - } - /** * Initialize resource model. * @@ -155,15 +109,6 @@ public function getPermissions() return $this->permissions; } - /** - * @inheritDoc - */ - public function afterSave() - { - $this->pillPut->put(); - return parent::afterSave(); - } - /** * @inheritdoc */