28 $role = $this->
get($role);
31 throw new \Zend_Acl_Role_Registry_Exception(
"Child Role id '{$roleId}' does not exist");
34 if (!is_array($parents)) {
35 $parents = [$parents];
37 foreach ($parents as $parent) {
40 $roleParentId = $parent->getRoleId();
42 $roleParentId = $parent;
44 $roleParent = $this->
get($roleParentId);
46 throw new \Zend_Acl_Role_Registry_Exception(
"Parent Role id '{$roleParentId}' does not exist");
48 $this->_roles[
$roleId][
'parents'][$roleParentId] = $roleParent;
49 $this->_roles[$roleParentId][
'children'][
$roleId] = $role;
addParent($role, $parents)