mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-04-16 10:16:22 +02:00
38 lines
1.0 KiB
PHP
38 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Entity\Source\Complex\Collection;
|
|
|
|
use App\Entity\Source\AbstractSource;
|
|
use App\Entity\Attribut\CollectionAttribut;
|
|
use Doctrine\Common\Collections\Collection;
|
|
use App\Entity\Source\SourceInterface;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
use Doctrine\Common\Collections\ArrayCollection;
|
|
|
|
/**
|
|
* @ORM\Entity
|
|
* @ORM\Table(name="source_collection")
|
|
* @ORM\InheritanceType("JOINED")
|
|
* @ORM\DiscriminatorColumn(name="discr", type="string")
|
|
* @ORM\DiscriminatorMap({"member" = "TreeCollectionSource"})
|
|
*
|
|
* @author kevinfrantz
|
|
*/
|
|
abstract class AbstractCollectionSource extends AbstractSource implements CollectionSourceInterface
|
|
{
|
|
use CollectionAttribut;
|
|
|
|
/**
|
|
* @var Collection|SourceInterface[]
|
|
* @ORM\ManyToMany(targetEntity="App\Entity\Source\AbstractSource",inversedBy="memberships")
|
|
* @ORM\JoinTable(name="source_group_members")
|
|
*/
|
|
protected $collection;
|
|
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
$this->collection = new ArrayCollection();
|
|
}
|
|
}
|