Mixin_Security_Actor_Entity

The NextGEN Gallery Mixin Security Actor Entity class.

Defined (1)

The class is defined in the following location(s).

/products/photocrati_nextgen/modules/security/package.module.security.php  
  1. class Mixin_Security_Actor_Entity extends Mixin 
  2. var $entity_object = null; 
  3. var $entity_props = null; 
  4. // Note, an Actor with null $entity is considered a "Guest", i.e. no privileges 
  5. function set_entity($entity, $entity_props = null) 
  6. $this->object->entity_object = $entity; 
  7. $this->object->entity_props = $entity_props; 
  8. function get_entity($entity = null) 
  9. if ($entity == null) { 
  10. $entity = $this->object->entity_object; 
  11. if ($entity != null && $entity == $this->object->entity_object) { 
  12. return $entity; 
  13. return null; 
  14. function get_entity_id($entity = null) 
  15. $entity = $this->object->get_entity($entity); 
  16. if ($entity != null) { 
  17. $entity_props = $this->object->entity_props; 
  18. if (isset($entity_props['id'])) { 
  19. return $entity_props['id']; 
  20. return null; 
  21. function get_entity_type($entity = null) 
  22. $entity = $this->object->get_entity($entity); 
  23. if ($entity != null) { 
  24. $entity_props = $this->object->entity_props; 
  25. if (isset($entity_props['type'])) { 
  26. return $entity_props['type']; 
  27. return null;