protected function _getAcos() {
        $acos = $this->Acl->Aco->find('all', array('order' => 'Acos.lft ASC', 'recursive' => -1))->toArray();
        $parents = array();
        foreach ($acos as $key => $data) {

            $aco = & $acos[$key];
            $aco = $aco->toArray();
            $id = $aco['id'];
            
            // Generate path
            if ($aco['parent_id'] && isset($parents[$aco['parent_id']])) {
                $parents[$id] = $parents[$aco['parent_id']] . '/' . $aco['alias'];
            } else {
                $parents[$id] = $aco['alias'];
            }
            $aco['action'] = $parents[$id];
        }
        return $acos;
    }
protected function _getAcos() {
        $acos = $this->Acl->Aco->find('all', array('order' => 'Acos.lft ASC', 'recursive' => -1))->toArray();
        $parents = array();
        foreach ($acos as $key => $data) {

            $aco = & $acos[$key];
            $aco = $aco->toArray();
            $id = $aco['id'];
            
            // Generate path
            if ($aco['parent_id'] && isset($parents[$aco['parent_id']])) {
                $parents[$id] = $parents[$aco['parent_id']] . '/' . $aco['alias'];
            } else {
                $parents[$id] = $aco['alias'];
            }
            $aco['action'] = $parents[$id];
        }
        return $acos;
    }
protected function _getAcos ( ) { $ acos = $ this -> Acl -> Aco -> find ( 'all' , array ( 'order' => 'Acos.lft ASC' , 'recursive' => - 1 ) ) -> toArray ( ) ; $ parents = array ( ) ; foreach ( $ acos as $ key => $ data ) { $ aco = & $ acos [ $ key ] ; $ aco = $ aco -> toArray ( ) ; $ id = $ aco [ 'id' ] ; // Generate path if ( $ aco [ 'parent_id' ] && isset ( $ parents [ $ aco [ 'parent_id' ] ] ) ) { $ parents [ $ id ] = $ parents [ $ aco [ 'parent_id' ] ] . '/' . $ aco [ 'alias' ] ; } else { $ parents [ $ id ] = $ aco [ 'alias' ] ; } $ aco [ 'action' ] = $ parents [ $ id ] ; } return $ acos ; }
Returns all the ACOs including their path
Returns all the ACOs including their path