Entity/EntityService.php
public function findEntities(Request $request, $filters = array(), $addPagination = false)
    {
        $options = $this->getOptions($request, $filters, $addPagination);
        if (!$addPagination) {
            return array(
                'entities' => $this->getRepository()->getEntities($options),
                'options' => $options
            );
        }

        $entities = $this->getRepository()->getPaginatedEntities($options);
        $options['elements'] = $entities->count();
        $options['pages'] = (int)ceil($options['elements'] / $options['elementsPerPage']);

        return array(
            'entities' => $entities,
            'options' => $options
        );
    }
public function findEntities(Request $request, $filters = array(), $addPagination = false)
    {
        $options = $this->getOptions($request, $filters, $addPagination);
        if (!$addPagination) {
            return array(
                'entities' => $this->getRepository()->getEntities($options),
                'options' => $options
            );
        }

        $entities = $this->getRepository()->getPaginatedEntities($options);
        $options['elements'] = $entities->count();
        $options['pages'] = (int)ceil($options['elements'] / $options['elementsPerPage']);

        return array(
            'entities' => $entities,
            'options' => $options
        );
    }
public function findEntities ( Request $ request , $ filters = array ( ) , $ addPagination = false ) { $ options = $ this -> getOptions ( $ request , $ filters , $ addPagination ) ; if ( ! $ addPagination ) { return array ( 'entities' => $ this -> getRepository ( ) -> getEntities ( $ options ) , 'options' => $ options ) ; } $ entities = $ this -> getRepository ( ) -> getPaginatedEntities ( $ options ) ; $ options [ 'elements' ] = $ entities -> count ( ) ; $ options [ 'pages' ] = ( int ) ceil ( $ options [ 'elements' ] / $ options [ 'elementsPerPage' ] ) ; return array ( 'entities' => $ entities , 'options' => $ options ) ; }
Returns a list of entities.

@param \Symfony\Component\HttpFoundation\Request $request
@param array $filters
@param bool $addPagination
@return array
Returns a list of entities .