本文整理汇总了PHP中core_kernel_classes_Class::removePropertyValue方法的典型用法代码示例。如果您正苦于以下问题:PHP core_kernel_classes_Class::removePropertyValue方法的具体用法?PHP core_kernel_classes_Class::removePropertyValue怎么用?PHP core_kernel_classes_Class::removePropertyValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core_kernel_classes_Class
的用法示例。
在下文中一共展示了core_kernel_classes_Class::removePropertyValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: remove
/**
* Short description of method remove
*
* @access public
* @author Jehan Bihin, <jehan.bihin@tudor.lu>
* @param string $roleUri
* @param string $accessUri
* @return mixed
*/
public function remove($roleUri, $accessUri)
{
$module = new core_kernel_classes_Resource($accessUri);
$role = new core_kernel_classes_Class($roleUri);
$accessProperty = new core_kernel_classes_Property(funcAcl_models_classes_AccessService::PROPERTY_ACL_GRANTACCESS);
// Retrieve the module ID.
$uri = explode('#', $module->getUri());
list($type, $extId, $modId) = explode('_', $uri[1]);
// access via extension?
$extAccess = funcAcl_helpers_Cache::getExtensionAccess($extId);
if (in_array($roleUri, $extAccess)) {
// remove access to extension
$extUri = $this->makeEMAUri($extId);
funcAcl_models_classes_ExtensionAccessService::singleton()->remove($roleUri, $extUri);
// add access to all other controllers
foreach (funcAcl_helpers_Model::getModules($extId) as $eModule) {
if (!$module->equals($eModule)) {
$this->add($roleUri, $eModule->getUri());
$this->getEventManager()->trigger(new AccessRightRemovedEvent($roleUri, $eModule->getUri()));
//$role->setPropertyValue($accessProperty, $eModule->getUri());
}
}
//funcAcl_helpers_Cache::flushExtensionAccess($extId);
}
// Remove the access to the module for this role.
$role->removePropertyValue($accessProperty, $module->getUri());
$this->getEventManager()->trigger(new AccessRightRemovedEvent($roleUri, $accessUri));
funcAcl_helpers_Cache::cacheModule($module);
// Remove the access to the actions corresponding to the module for this role.
foreach (funcAcl_helpers_Model::getActions($module) as $actionResource) {
funcAcl_models_classes_ActionAccessService::singleton()->remove($role->getUri(), $actionResource->getUri());
}
funcAcl_helpers_Cache::cacheModule($module);
}