mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-02-13 06:24:21 +01:00
36 lines
796 B
PHP
36 lines
796 B
PHP
|
<?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;
|
||
|
}
|
||
|
}
|