} /**
* Get the number of emotion landing pages which will be updated
*
* @return int
*/
public function countEmotions() { $repo =
Shopware()->
Models()->
getRepository(Emotion::
class);
$builder =
$repo->
getListingQuery();
$builder ->
andWhere('emotions.is_landingpage = 1 '
) ->
andWhere('emotions.parent_id IS NULL'
) ->
andWhere('emotions.active = 1'
);
$builder->
select('COUNT(DISTINCT emotions.id)'
) ->
resetQueryPart('groupBy'
) ->
resetQueryPart('orderBy'
);
$statement =
$builder->
execute();