PHP code example of balicekt / doctrine-behaviors

1. Go to this page and download the library: Download balicekt/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/ */

    

balicekt / 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;

}