PHP code example of fsi / translatable
1. Go to this page and download the library: Download fsi/translatable 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/ */
fsi / translatable example snippets
declare(strict_types=1);
namespace Tests\Entity;
use DateTimeImmutable;
use FSi\Component\Translatable\Integration\Doctrine\ORM\ProxyTrait;
class Article
{
use ProxyTrait;
private ?int $id = null;
private ?string $locale = null;
private ?DateTimeImmutable $publicationDate = null;
private ?string $title = null;
private ?string $description = null;
// getters and setters will probably be
return [
// Doctrine and Symfony bundles
FSi\Component\Translatable\Integration\Symfony\TranslatableBundle::class => ['all' => true]
];