prepareParam example

$builder->expr()->orX(
                        'detail.number LIKE :free',
                        'articles.name LIKE :free'
                    )
                );
                $builder->setParameter(':free', $filter['value']);
            } else {
                $repository->addFilter($builder[$filter]);
            }
        }

        $repository->addOrderBy($builder$this->prepareParam($this->Request()->getParam('sort', [])$fields));

        $builder->setFirstResult($this->Request()->getParam('start'))
            ->setMaxResults($this->Request()->getParam('limit'));

        $query = $builder->getQuery();

        $paginator = $this->get('models')->createPaginator($query);

        // Get total result of the query         $total = $paginator->count();

        
Home | Imprint | This part of the site doesn't use cookies.