->
addOrderBy((array) $this->
Request()->
getParam('sort',
[])) ->
setFirstResult($this->
Request()->
getParam('start', 0
)) ->
setMaxResults($this->
Request()->
getParam('limit', 250
));
$query =
$builder->
getQuery();
$total =
$modelManager->
getQueryCount($query);
$data =
$query->
getArrayResult();
// translate the document names
/** @var Shopware_Components_Translation $translationComponent */
$translationComponent =
$this->
get(Shopware_Components_Translation::
class);
$data =
$translationComponent->
translateDocuments($data);
$this->
View()->
assign(['success' => true, 'data' =>
$data, 'total' =>
$total]);
} public function getLandingPagesAction(Request
$request): void
{ $modelManager =
$this->container->
get(ModelManager::
class);
$emotionRepository =
$modelManager->
getRepository(Emotion::
class);
$builder =
$emotionRepository->
createQueryBuilder('emotion'
);