?? GreyFile — Mystic File Browser

Current path: home/webdevt/www/schtroumpf.fr/modules/an_productattributes/classes/



?? Go up: /home/webdevt/www/schtroumpf.fr/modules/an_productattributes

?? Viewing: anProductAttr.php

<?php
/**
 * 2022 Anvanto
 *
 * NOTICE OF LICENSE
 *
 * This file is not open source! Each license that you purchased is only available for 1 wesite only.
 * If you want to use this file on more websites (or projects), you need to purchase additional licenses. 
 * You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party.
 *
 *  @author Anvanto <anvantoco@gmail.com>
 *  @copyright  2022 Anvanto
 *  @license    Valid for 1 website (or project) for each purchase of license
 *  International Registered Trademark & Property of Anvanto
 */
use PrestaShop\PrestaShop\Adapter\Image\ImageRetriever;

class anProductAttr 
{
    public static function getProductImages($product, $context)
    {
        $imageRetriever = new ImageRetriever($context->link);
        return $imageRetriever->getProductImages($product, $context->language);
    }  
    
    public static function getProductCover($productImages)
    {
        foreach ($productImages as $image){
            if ($image['cover']){
                return $image;
            }
        }
        return false;
    }

    
 }


??

??