mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Optimized Entity draft
This commit is contained in:
30
application/src/Entity/Attribut/NodeAttribut.php
Normal file
30
application/src/Entity/Attribut/NodeAttribut.php
Normal 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;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user