private function __findAro($aro) {
        
        
        if(isset($aro->parent_id)) {
            $conditions = [
                'parent_id' => $aro->parent_id,
                'foreign_key' => $aro->foreign_key,
                'model' => $aro->model
            ];
        } else {
            $conditions = [
                'parent_id IS NULL',
                'foreign_key' => $aro->foreign_key,
                'model' => $aro->model
            ];
        }

        return $this->Acl->Aro->find('all', [
            'conditions' => $conditions,
            'recursive' => -1
        ])->count();
    }
private function __findAro($aro) {
        
        
        if(isset($aro->parent_id)) {
            $conditions = [
                'parent_id' => $aro->parent_id,
                'foreign_key' => $aro->foreign_key,
                'model' => $aro->model
            ];
        } else {
            $conditions = [
                'parent_id IS NULL',
                'foreign_key' => $aro->foreign_key,
                'model' => $aro->model
            ];
        }

        return $this->Acl->Aro->find('all', [
            'conditions' => $conditions,
            'recursive' => -1
        ])->count();
    }
private function __findAro ( $ aro ) { if ( isset ( $ aro -> parent_id ) ) { $ conditions = [ 'parent_id' => $ aro -> parent_id , 'foreign_key' => $ aro -> foreign_key , 'model' => $ aro -> model ] ; } else { $ conditions = [ 'parent_id IS NULL' , 'foreign_key' => $ aro -> foreign_key , 'model' => $ aro -> model ] ; } return $ this -> Acl -> Aro -> find ( 'all' , [ 'conditions' => $ conditions , 'recursive' => - 1 ] ) -> count ( ) ; }
Find aro in database and returns the number of matches

@param object $aro
Find aro in database and returns the number of matches