makeEMAUri($ext); ExtensionAccessService::singleton()->add($role->getUri(), $accessUri); } public function grantModuleAccess(\core_kernel_classes_Resource $role, $ext, $mod) { $accessUri = $this->makeEMAUri($ext, $mod); ModuleAccessService::singleton()->add($role->getUri(), $accessUri); } public function grantActionAccess(\core_kernel_classes_Resource $role, $ext, $mod, $act) { $accessUri = $this->makeEMAUri($ext, $mod, $act); ActionAccessService::singleton()->add($role->getUri(), $accessUri); } public function revokeExtensionAccess(\core_kernel_classes_Resource $role, $ext) { $accessUri = $this->makeEMAUri($ext); ExtensionAccessService::singleton()->remove($role->getUri(), $accessUri); } public function revokeModuleAccess(\core_kernel_classes_Resource $role, $ext, $mod) { $accessUri = $this->makeEMAUri($ext, $mod); ModuleAccessService::singleton()->remove($role->getUri(), $accessUri); } public function revokeActionAccess(\core_kernel_classes_Resource $role, $ext, $mod, $act) { $accessUri = $this->makeEMAUri($ext, $mod, $act); ActionAccessService::singleton()->remove($role->getUri(), $accessUri); } /** * Short description of method makeEMAUri * * @access public * @author Jehan Bihin, * @param string $ext * @param string $mod * @param string $act * @return string */ public function makeEMAUri($ext, $mod = null, $act = null) { $returnValue = (string) ''; $returnValue = self::FUNCACL_NS . '#'; if (! is_null($act)) { $type = 'a'; } else { if (! is_null($mod)) { $type = 'm'; } else { $type = 'e'; } } $returnValue .= $type . '_' . $ext; if (! is_null($mod)) { $returnValue .= '_' . $mod; } if (! is_null($act)) { $returnValue .= '_' . $act; } return (string) $returnValue; } }