$shopIds =
array_column($list['data'
], 'shopId'
);
$shopIds =
array_keys(array_flip(array_filter($shopIds)));
if (empty($shopIds)) { return $list;
} // assign shops over additional query to improve performance
$shops =
$this->
getShops($shopIds);
return $this->
assignShops($list,
$shops);
} protected function getListQuery() { $query = parent::
getListQuery();
$query->
addSelect(['PARTIAL article.{id, name}'
]);
$query->
leftJoin('vote.article', 'article'
);
return $query;
}