PHP code example of abenmada / sylius-translation-plugin
1. Go to this page and download the library: Download abenmada/sylius-translation-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/ */
abenmada / sylius-translation-plugin example snippets
return [
//..
Lexik\Bundle\TranslationBundle\LexikTranslationBundle::class => ['all' => true],
Abenmada\TranslationPlugin\TranslationPlugin::class => ['all' => true],
]
declare(strict_types=1);
namespace App\Entity\Channel;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Abenmada\TranslationPlugin\Model\Channel\ChannelTrait as AbenmadaTranslationChannelTrait;
use Sylius\Component\Core\Model\Channel as BaseChannel;
/**
* @ORM\Entity
* @ORM\Table(name="sylius_channel")
*/
class Channel extends BaseChannel
{
use AbenmadaTranslationChannelTrait;
public function __construct()
{
$this->channelTranslations = new ArrayCollection();
parent::__construct();
}
}