/**
  * @param iActionDescription $action
  * @return array
  */
 public static function toArray(iActionDescription $action)
 {
     return array('name' => $action->getName(), 'desc' => $action->getDescription(), 'privileges' => $action->getRequiredRights());
 }
Esempio n. 2
0
 /**
  * 
  * @param core_kernel_classes_Resource $controllerResource
  * @param iActionDescription $action
  * @return core_kernel_classes_Resource
  */
 private function storeAction(core_kernel_classes_Resource $controllerResource, iActionDescription $action)
 {
     list($prefix, $extensionName, $controllerName) = explode('_', substr($controllerResource->getUri(), strrpos($controllerResource->getUri(), '#')));
     $specialURI = FUNCACL_NS . '#a_' . $extensionName . '_' . $controllerName . '_' . $action->getName();
     $actionClass = new core_kernel_classes_Class(CLASS_ACL_ACTION);
     $actionResource = $actionClass->createInstance($action->getName(), $action->getDescription(), $specialURI);
     $actionResource->setPropertiesValues(array(PROPERTY_ACL_ACTION_MEMBEROF => $controllerResource, PROPERTY_ACL_COMPONENT_ID => $action->getName()));
     return $actionResource;
 }
Esempio n. 3
0
 private function storeAction($controllerClassName, iActionDescription $action)
 {
     $key = $controllerClassName . '@' . $action->getName();
     $this->persistence->set($key, ActionDescription::toArray($action));
 }