Newscoop\Controller\Action\Helper\Datatable\Adapter\Doctrine::getData PHP Method

getData() public method

public getData ( array $p_params, array $p_cols )
$p_params array
$p_cols array
    public function getData(array $p_params, array $p_cols)
    {
        $this->_queryObject = $this->_repository->createQueryBuilder('e');
        // search
        if (!empty($p_params['search'])) {
            $this->search($p_params['search'], $p_cols);
        }
        // sort
        if (@count($p_params['sortCol'])) {
            $this->sort($p_params, $p_cols);
        }
        // limit
        $this->_queryObject->setFirstResult((int) $p_params['displayStart'])->setMaxResults((int) $p_params['displayLength']);
        return $this->_queryObject->getQuery()->getResult();
    }