[ Index ] |
PHP Cross Reference of ACL Module |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * Specialization of Permission providing some convenient functionality 5 * 6 * @author dispy <dispyfree@googlemail.com> 7 * @license LGPLv2 8 * @package acl.strategies.nestedSet.pathMaterialiization 9 */ 10 class PmPermission extends Permission{ 11 12 /** 13 * Removes all permissions associated to the given object 14 * @param AclObject $obj 15 * @param array[string] $path If given, the paths of the object ware not 16 * retrieved but taken from this parameter 17 */ 18 public static function deleteByObject(AclObject $obj, array $paths = NULL){ 19 $type = Util::getDataBaseType($obj); 20 21 if($paths === NULL) 22 $paths = $obj->getPaths(); 23 24 $condition = PmPathManager::buildMultiplePathCondition($type.'_path', $paths); 25 26 return PmPermission::model()->deleteAll($condition); 27 } 28 29 public static function getPathFieldForType($type){ 30 return $type.'_path'; 31 } 32 } 33 34 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Jul 1 19:24:45 2012 | Cross-referenced by PHPXref 0.7.1 |