mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Moved collections to complex
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?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();
|
||||
}
|
||||
}
|
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Source\Complex\Collection;
|
||||
|
||||
use App\Entity\Source\SourceInterface;
|
||||
use App\Entity\Attribut\CollectionAttributInterface;
|
||||
|
||||
interface CollectionSourceInterface extends SourceInterface, CollectionAttributInterface
|
||||
{
|
||||
}
|
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Source\Complex\Collection;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use App\Entity\Attribut\CollectionAttribut;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*
|
||||
* @todo remove deprecated trait membersattribut
|
||||
* @ORM\Table(name="source_group")
|
||||
* @ORM\Entity
|
||||
*/
|
||||
class TreeCollectionSource extends AbstractCollectionSource implements TreeCollectionSourceInterface
|
||||
{
|
||||
use CollectionAttribut;
|
||||
}
|
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Source\Complex\Collection;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
interface TreeCollectionSourceInterface extends CollectionSourceInterface
|
||||
{
|
||||
}
|
Reference in New Issue
Block a user