Implemented setIdentity for RequestedEntity

This commit is contained in:
Kevin Frantz
2019-01-26 17:17:20 +01:00
parent a7ad02be50
commit 89140837b7
9 changed files with 77 additions and 39 deletions

View File

@@ -5,15 +5,13 @@ namespace App\Entity;
use App\Attribut\IdAttribut;
use Doctrine\ORM\Mapping as ORM;
use App\Attribut\VersionAttribut;
use App\Attribut\SlugAttribut;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @author kevinfrantz
*/
abstract class AbstractEntity implements EntityInterface
{
use IdAttribut, VersionAttribut,SlugAttribut;
use IdAttribut, VersionAttribut;
/**
* @ORM\Id()
@@ -31,21 +29,6 @@ abstract class AbstractEntity implements EntityInterface
*/
protected $version;
/**
* System slugs should be writen in UPPER CASES
* Slugs which are defined by the user are checked via the assert.
*
* @ORM\Column(type="string",length=30,nullable=true,unique=true)
* @Assert\Regex(pattern="/^[a-z]+$/")
*
* @todo Check out if a plugin can solve this purpose;
*
* @see https://github.com/Atlantic18/DoctrineExtensions/blob/master/doc/sluggable.md
*
* @var string
*/
protected $slug;
public function __construct()
{
$this->version = 0;