/** * {@inheritDoc} * @see IPluggableAccessManager::hasItemChild() */ public function hasItemChild(IPluggableModule $module, IPluggableAccessHierarchy $hierarchy) { /* @var $role1 AccessRole */ $role1 = $this->getAuthItem($module, $hierarchy->getHigherLevelName()); if ($role1 === null) { return false; } /* @var $role2 AccessRole */ $role2 = $this->getAuthItem($module, $hierarchy->getLowerLevelName()); if ($role2 === null) { return false; } return AccessRoleHierarchy::model()->countByAttributes(array('access_role_higher_id' => $role1->access_role_id, 'access_role_lower_id' => $role2->access_role_id)) > 0; }
/** * {@inheritDoc} * @see IPluggableAccessManager::hasItemChild() */ public function hasItemChild(IPluggableModule $module, IPluggableAccessHierarchy $hierarchy) { return $this->_manager->hasItemChild($module->getId() . '::' . $hierarchy->getHigherLevelName(), $module->getId() . '::' . $hierarchy->getLowerLevelName()); }