summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Cornutt <enygma@phpdeveloper.org>2015-01-11 14:37:35 -0600
committerChris Cornutt <enygma@phpdeveloper.org>2015-01-11 14:37:35 -0600
commite02cd6cbbc42b056698eaa36ef1cb20f9b490a9a (patch)
treeab2210b980d9a28f3cad4f19de4e95a8bb0ec6e3
parent9755274838b555d58167d47b6f165e116c807012 (diff)
downloadgatekeeper-e02cd6cbbc42b056698eaa36ef1cb20f9b490a9a.zip
gatekeeper-e02cd6cbbc42b056698eaa36ef1cb20f9b490a9a.tar.gz
gatekeeper-e02cd6cbbc42b056698eaa36ef1cb20f9b490a9a.tar.bz2
adding "children" property to permission model
-rw-r--r--src/Psecio/Gatekeeper/PermissionModel.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Psecio/Gatekeeper/PermissionModel.php b/src/Psecio/Gatekeeper/PermissionModel.php
index c3e9198..474b176 100644
--- a/src/Psecio/Gatekeeper/PermissionModel.php
+++ b/src/Psecio/Gatekeeper/PermissionModel.php
@@ -39,6 +39,15 @@ class PermissionModel extends \Psecio\Gatekeeper\Model\Mysql
'description' => 'Date Updated',
'column' => 'updated',
'type' => 'datetime'
+ ),
+ 'children' => array(
+ 'description' => 'Child Permissions',
+ 'type' => 'relation',
+ 'relation' => array(
+ 'model' => '\\Psecio\\Gatekeeper\\PermissionCollection',
+ 'method' => 'findChildrenByPermissionId',
+ 'local' => 'id'
+ )
)
);