PHP code example of clear01 / doctrine-behaviors
1. Go to this page and download the library: Download clear01/doctrine-behaviors 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/ */
clear01 / doctrine-behaviors example snippets
class Article
{
use Knp\DoctrineBehaviors\Model\Translatable\Translatable;
// returns translated property for $article->getTitle() or $article->title
use Zenify\DoctrineBehaviors\Entities\Attributes\Translatable;
}
class ArticleTranslation
{
use Knp\DoctrineBehaviors\Model\Translatable\Translation;
/**
* @ORM\Column(type="string")
* @var string
*/
public $title;
}
class Article
{
use Knp\DoctrineBehaviors\Model\Timestampable\Timestampable;
}