mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Implemented TreeCollectionSource
This commit is contained in:
@@ -13,8 +13,8 @@ use App\Entity\Attribut\LawAttribut;
|
||||
use App\Entity\Meta\LawInterface;
|
||||
use App\Entity\Meta\Law;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use App\Entity\Source\Collection\MemberCollectionSource;
|
||||
use App\Entity\Attribut\MembershipsAttribut;
|
||||
use App\Entity\Source\Collection\TreeCollectionSourceInterface;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
@@ -24,7 +24,7 @@ use App\Entity\Attribut\MembershipsAttribut;
|
||||
* @ORM\Table(name="source")
|
||||
* @ORM\InheritanceType("JOINED")
|
||||
* @ORM\DiscriminatorColumn(name="discr", type="string")
|
||||
* @ORM\DiscriminatorMap({"user" = "UserSource","name" = "NameSource","group" = "App\Entity\Source\Collection\MemberCollectionSource"})
|
||||
* @ORM\DiscriminatorMap({"user" = "UserSource","name" = "NameSource","collection" = "App\Entity\Source\Collection\AbstractCollectionSource","operation"="App\Entity\Source\Operation\AbstractOperation"})
|
||||
*/
|
||||
abstract class AbstractSource extends AbstractEntity implements SourceInterface
|
||||
{
|
||||
@@ -42,8 +42,8 @@ abstract class AbstractSource extends AbstractEntity implements SourceInterface
|
||||
* @todo Implement that just one table on database level is needed!
|
||||
* @todo Rename table to use the right schema
|
||||
*
|
||||
* @var Collection|MemberCollectionSource[]
|
||||
* @ORM\ManyToMany(targetEntity="App\Entity\Source\Collection\MemberCollectionSource",mappedBy="collection")
|
||||
* @var Collection|TreeCollectionSourceInterface[]
|
||||
* @ORM\ManyToMany(targetEntity="App\Entity\Source\Collection\TreeCollectionSource",mappedBy="collection")
|
||||
*/
|
||||
protected $memberships;
|
||||
|
||||
|
@@ -14,7 +14,7 @@ use Doctrine\Common\Collections\ArrayCollection;
|
||||
* @ORM\Table(name="source_collection")
|
||||
* @ORM\InheritanceType("JOINED")
|
||||
* @ORM\DiscriminatorColumn(name="discr", type="string")
|
||||
* @ORM\DiscriminatorMap({"member" = "MemberCollectionSource"})
|
||||
* @ORM\DiscriminatorMap({"member" = "TreeCollectionSource"})
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
|
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Source\Collection;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use App\Entity\Attribut\MembersAttribut;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
* @ORM\Table(name="source_group")
|
||||
* @ORM\Entity
|
||||
*/
|
||||
final class MemberCollectionSource extends AbstractCollectionSource implements MemberCollectionSourceInterface
|
||||
{
|
||||
use MembersAttribut;
|
||||
}
|
@@ -1,12 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Source\Collection;
|
||||
|
||||
use App\Entity\Attribut\MembersAttributInterface;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
interface MemberCollectionSourceInterface extends MembersAttributInterface, CollectionSourceInterface
|
||||
{
|
||||
}
|
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Source\Collection;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use App\Entity\Attribut\MembersAttribut;
|
||||
use App\Entity\Method\CollectionDimensionHelperMethod;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*
|
||||
* @todo remove deprecated trait membersattribut
|
||||
* @ORM\Table(name="source_group")
|
||||
* @ORM\Entity
|
||||
*/
|
||||
final class TreeCollectionSource extends AbstractCollectionSource implements TreeCollectionSourceInterface
|
||||
{
|
||||
use MembersAttribut;
|
||||
use CollectionDimensionHelperMethod;
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Source\Collection;
|
||||
|
||||
use App\Entity\Attribut\MembersAttributInterface;
|
||||
use App\Helper\DimensionHelperInterface;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
interface TreeCollectionSourceInterface extends MembersAttributInterface, CollectionSourceInterface, DimensionHelperInterface
|
||||
{
|
||||
}
|
Reference in New Issue
Block a user