PHP code example of setono / sylius-image-plugin

1. Go to this page and download the library: Download setono/sylius-image-plugin library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

setono / sylius-image-plugin example snippets



$bundles = [
    // ...
    
    Setono\SyliusImagePlugin\SetonoSyliusImagePlugin::class => ['all' => true],
    Sylius\Bundle\GridBundle\SyliusGridBundle::class => ['all' => true],
    
    // ...
];



declare(strict_types=1);

namespace App\Entity\Product;

use Doctrine\ORM\Mapping as ORM;
use Setono\SyliusImagePlugin\Model\ImageInterface as SetonoSyliusImagePluginImageInterface;
use Setono\SyliusImagePlugin\Model\ImageTrait as SetonoSyliusImagePluginImageTrait;
use Sylius\Component\Core\Model\ProductImage as BaseProductImage;

/**
 * @ORM\Entity
 * @ORM\Table(name="sylius_product_image")
 */
class ProductImage extends BaseProductImage implements SetonoSyliusImagePluginImageInterface
{
    use SetonoSyliusImagePluginImageTrait;
}