/** * Count the number of results based on the passed request * * @param Request $request Request object used in this count method * * @return int */ public function getTotalResultCount(Request $request) { /** @var \Tasker\Mapper\Process\Entity $mapper */ $mapper = DbMapperFactory::make('process|entity'); $requestDataArray = $request->getData(); $mapper->setArrays($requestDataArray); $dbAttributesForQuery = $mapper->getMappedSecondAttributes(); $processQuery = new ProcessQuery(); return $processQuery->filterByArray($dbAttributesForQuery)->count(); }