Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $threadConditions['conditions'] = array('Aco.parent_id !='=>NULL);
- $aroAlis = $this->Acl->Aro->Aco->find('threaded',$threadConditions);
- $custmAlis = $this->_threaded_to_list_acos($aroAlis,'Aco'); //same function as a generatetreelist()
- foreach($custmAlis as $keyPKrec => $keyPKId)
- {
- $rootCtrl = "";
- $parentIDSarray = $this->Acl->Aro->Aco->getpath($keyPKrec);
- if(count($parentIDSarray)==2)
- {
- $rootCtrlFirst = $parentIDSarray[1]['Aco']['alias'];
- }
- else if(count($parentIDSarray)==3 || count($parentIDSarray)==4)
- {
- $rootCtrl .= $rootCtrlFirst."/".$parentIDSarray[2]['Aco']['alias']."/".$parentIDSarray[3]['Aco']['alias'];
- }
- $exploded = explode("/",$rootCtrl);
- if(count($exploded) == 3)
- {
- if($exploded[2] == 0)
- {
- $rootBuild[$keyPKrec] = $exploded[0]."/".$exploded[1];
- }
- if($exploded[0] == 'Acl' && ($exploded[1] == 'Acos' ))
- {
- $rootBuild[$keyPKrec] = $exploded[0]."/".$exploded[1]."/".$exploded[2];
- }
- if($exploded[0] == 'Acl' && ($exploded[1] == 'Aros' ))
- {
- $rootBuild[$keyPKrec] = $exploded[0]."/".$exploded[1]."/".$exploded[2];
- }
- }
- }
- $actions = $rootBuild;
- // $actions = $this->AclReflector->get_all_actions();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement