* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ namespace PrestaShop\PrestaShop\Adapter\Presenter\Product; use Hook; use Language; use PrestaShop\PrestaShop\Core\Product\ProductPresentationSettings; class ProductListingPresenter extends ProductPresenter { /** * @param ProductPresentationSettings $settings * @param array $product * @param Language $language * * @return ProductLazyArray|ProductListingLazyArray * * @throws \ReflectionException */ public function present( ProductPresentationSettings $settings, array $product, Language $language ) { $productListingLazyArray = new ProductListingLazyArray( $settings, $product, $language, $this->imageRetriever, $this->link, $this->priceFormatter, $this->productColorsRetriever, $this->translator ); Hook::exec('actionPresentProductListing', ['presentedProduct' => &$productListingLazyArray] ); return $productListingLazyArray; } }