return array_shift($manufacturers);
} /**
* {@inheritdoc}
*/
public function getList(array
$ids, ShopContextInterface
$context) { $query =
$this->connection->
createQueryBuilder();
$query->
addSelect($this->fieldHelper->
getManufacturerFields());
$query->
addSelect('media.id as __manufacturer_img_id'
);
$query->
from('s_articles_supplier', 'manufacturer'
) ->
leftJoin('manufacturer', 's_articles_supplier_attributes', 'manufacturerAttribute', 'manufacturerAttribute.supplierID = manufacturer.id'
) ->
leftJoin('manufacturer', 's_media', 'media', 'media.path = manufacturer.img'
) ->
where('manufacturer.id IN (:ids)'
) ->
setParameter(':ids',
$ids, Connection::PARAM_INT_ARRAY
);
$this->fieldHelper->
addManufacturerTranslation($query,
$context);
$data =
$query->
execute()->
fetchAll(PDO::FETCH_ASSOC
);