getCount() public method

Get count of data
public getCount ( ) : integer
return integer
Example #1
0
 /**
  * Filter/paginate/limit/order data source and return reset of data in array
  * @param  Components\DataGridPaginator\DataGridPaginator $paginator_component
  * @param  string                                          $sort
  * @param  array                                          $filters
  * @return array
  */
 public function filterData(Components\DataGridPaginator\DataGridPaginator $paginator_component = NULL, $sort, array $filters)
 {
     $this->data_source->filter($filters);
     /**
      * Paginator is optional
      */
     if ($paginator_component) {
         $paginator = $paginator_component->getPaginator();
         $paginator->setItemCount($this->data_source->getCount());
         $this->data_source->sort($sort)->limit($paginator->getOffset(), $paginator->getItemsPerPage());
     }
     return $this->data_source->getData();
 }