_resource = $objectManager->get(\Magento\Authorization\Model\ResourceModel\Role::class); $this->_resourceCollection = $objectManager->get( \Magento\Authorization\Model\ResourceModel\Role\Collection::class ); } /** * Class constructor * * @return void */ protected function _construct() { $this->_init(\Magento\Authorization\Model\ResourceModel\Role::class); } /** * Update object into database * * @return $this */ public function update() { $this->getResource()->update($this); return $this; } /** * Return users for role * * @return array */ public function getRoleUsers() { return $this->getResource()->getRoleUsers($this); } }