private function _parseAcos($acos) {
        $cache = [];
        foreach ($acos as $aco) {
            $data['Aco'] = [
                'id' => $aco->id,
                'parent_id' => $aco->parent_id,
                'foreign_key' => $aco->foreign_key,
                'alias' => $aco->alias,
                'lft' => $aco->lft,
                'rght' => $aco->rght,
            ];
            if (isset($aco->model)) {
                $data['Aco']['model'] = $aco->model;
            }

            $d = [];
            foreach ($aco['aros'] as $aro) {
                $d[] = [
                    'id' => $aro->id,
                    'parent_id' => $aro->parent_id,
                    'model' => $aro->model,
                    'foreign_key' => $aro->foreign_key,
                    'alias' => $aro->alias,
                    'lft' => $aro->lft,
                    'rght' => $aro->rght,
                    'Permission' => [
                        'aro_id' => $aro->_joinData->aro_id,
                        'id' => $aro->_joinData->id,
                        'aco_id' => $aro->_joinData->aco_id,
                        '_create' => $aro->_joinData->_create,
                        '_read' => $aro->_joinData->_read,
                        '_update' => $aro->_joinData->_update,
                        '_delete' => $aro->_joinData->_delete,
                    ]
                ];
            }

            $data['Aro'] = $d;

            array_push($cache, $data);
        }

        return $cache;
    }
private function _parseAcos($acos) {
        $cache = [];
        foreach ($acos as $aco) {
            $data['Aco'] = [
                'id' => $aco->id,
                'parent_id' => $aco->parent_id,
                'foreign_key' => $aco->foreign_key,
                'alias' => $aco->alias,
                'lft' => $aco->lft,
                'rght' => $aco->rght,
            ];
            if (isset($aco->model)) {
                $data['Aco']['model'] = $aco->model;
            }

            $d = [];
            foreach ($aco['aros'] as $aro) {
                $d[] = [
                    'id' => $aro->id,
                    'parent_id' => $aro->parent_id,
                    'model' => $aro->model,
                    'foreign_key' => $aro->foreign_key,
                    'alias' => $aro->alias,
                    'lft' => $aro->lft,
                    'rght' => $aro->rght,
                    'Permission' => [
                        'aro_id' => $aro->_joinData->aro_id,
                        'id' => $aro->_joinData->id,
                        'aco_id' => $aro->_joinData->aco_id,
                        '_create' => $aro->_joinData->_create,
                        '_read' => $aro->_joinData->_read,
                        '_update' => $aro->_joinData->_update,
                        '_delete' => $aro->_joinData->_delete,
                    ]
                ];
            }

            $data['Aro'] = $d;

            array_push($cache, $data);
        }

        return $cache;
    }
private function _parseAcos ( $ acos ) { $ cache = [ ] ; foreach ( $ acos as $ aco ) { $ data [ 'Aco' ] = [ 'id' => $ aco -> id , 'parent_id' => $ aco -> parent_id , 'foreign_key' => $ aco -> foreign_key , 'alias' => $ aco -> alias , 'lft' => $ aco -> lft , 'rght' => $ aco -> rght , ] ; if ( isset ( $ aco -> model ) ) { $ data [ 'Aco' ] [ 'model' ] = $ aco -> model ; } $ d = [ ] ; foreach ( $ aco [ 'aros' ] as $ aro ) { $ d [ ] = [ 'id' => $ aro -> id , 'parent_id' => $ aro -> parent_id , 'model' => $ aro -> model , 'foreign_key' => $ aro -> foreign_key , 'alias' => $ aro -> alias , 'lft' => $ aro -> lft , 'rght' => $ aro -> rght , 'Permission' => [ 'aro_id' => $ aro -> _joinData -> aro_id , 'id' => $ aro -> _joinData -> id , 'aco_id' => $ aro -> _joinData -> aco_id , '_create' => $ aro -> _joinData -> _create , '_read' => $ aro -> _joinData -> _read , '_update' => $ aro -> _joinData -> _update , '_delete' => $ aro -> _joinData -> _delete , ] ] ; } $ data [ 'Aro' ] = $ d ; array_push ( $ cache , $ data ) ; } return $ cache ; }
Returns an array with acos
@param Acos $acos Parse Acos entities and store into array formated
@return array
Returns an array with acos