Optimized Entity draft

This commit is contained in:
Kevin Frantz
2018-09-06 13:52:34 +02:00
parent 74038092e3
commit 3d42526698
13 changed files with 66 additions and 50 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace App\Entity\Attribut;
use App\Entity\NodeInterface;
/**
*
* @author kevinfrantz
*
*/
trait NodeAttribut{
/**
* @var NodeInterface
* @OneToOne(targetEntity="Node")
* @JoinColumn(name="source", referencedColumnName="id")
*/
protected $node;
public function setNode(NodeInterface $node): void
{
$this->node = $node;
}
public function getNode(): NodeInterface
{
return $this->node;
}
}