mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Optimized Law draft
This commit is contained in:
35
application/src/Entity/Attribut/ParentsAttribut.php
Normal file
35
application/src/Entity/Attribut/ParentsAttribut.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Attribut;
|
||||
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use App\Entity\NodeInterface;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
trait ParentsAttribut
|
||||
{
|
||||
/**
|
||||
* Many Nodes have many parents.
|
||||
*
|
||||
* @ORM\ManyToMany(targetEntity="Node")
|
||||
* @ORM\JoinTable(name="nodes_parents",
|
||||
* joinColumns={@ORM\JoinColumn(name="node_id", referencedColumnName="id")},
|
||||
* inverseJoinColumns={@ORM\JoinColumn(name="node_id", referencedColumnName="id")}
|
||||
* )
|
||||
*
|
||||
* @var ArrayCollection|NodeInterface[]
|
||||
*/
|
||||
protected $parents;
|
||||
|
||||
public function getParents(): ArrayCollection
|
||||
{
|
||||
return $this->parents;
|
||||
}
|
||||
|
||||
public function setParents(ArrayCollection $parents): void
|
||||
{
|
||||
$this->parents = $parents;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user