public function getAcl($forceReload = false) { $role = $this->getData('acl'); if (empty($role) or !empty($forceReload)) { $this->setData('acl', new Acl($this)); } return $this->getData('acl'); }
/** * Constructor * * @param UserModel $user User model to retrieve Acl, role name and check permission */ public function __construct(UserModel $user) { $this->acl = $user->getAcl(true); $this->roleName = $user->getRole()->getName(); }