/** * Fetches all published product's photo entities by its associated id * * @param string $id Product id * @return array */ public function fetchAllPublishedImagesById($id) { $images = $this->imageMapper->fetchAllByProductId($id); return $this->preparePhotos($id, $images); }