In between commit refactoring and implementing tests

This commit is contained in:
Kevin Frantz
2018-10-28 20:28:29 +01:00
parent 89396dfef3
commit de51649d63
21 changed files with 105 additions and 148 deletions

View File

@@ -12,7 +12,7 @@ use App\Entity\Attribut\RelationAttribut;
* @ORM\Table(name="meta_law")
* @ORM\Entity(repositoryClass="App\Repository\LawRepository")
*/
class Law extends AbstractMeta implements LawInterface
final class Law extends AbstractMeta implements LawInterface
{
use RightsAttribute, RelationAttribut;
@@ -24,15 +24,6 @@ class Law extends AbstractMeta implements LawInterface
*/
protected $rights;
/**
*
* @ORM\OneToOne(targetEntity="Relation",cascade={"persist", "remove"})
* @ORM\JoinColumn(name="relation_id", referencedColumnName="id")
*
* @var RelationInterface
*/
protected $relation;
public function __construct()
{
$this->initAllRights();

View File

@@ -9,6 +9,6 @@ use App\Entity\Method\RelationGrantedInterface;
/**
* @author kevinfrantz
*/
interface LawInterface extends RightsAttributInterface, RelationGrantedInterface, RelationAttributInterface,MetaInterface
interface LawInterface extends RightsAttributInterface, RelationGrantedInterface, MetaInterface
{
}

View File

@@ -16,7 +16,7 @@ use App\Entity\Attribut\RelationAttributInterface;
* @ORM\Table(name="meta_reciever_group")
* @ORM\Entity()
*/
class RecieverGroup extends AbstractMeta implements RecieverGroupInterface
final class RecieverGroup extends AbstractMeta implements RecieverGroupInterface
{
use RelationAttribut,RecieverAttribut;

View File

@@ -21,7 +21,7 @@ use Doctrine\Common\Collections\Collection;
* @ORM\Table(name="meta_relation")
* @ORM\Entity()
*/
class Relation extends AbstractMeta implements RelationInterface
final class Relation extends AbstractMeta implements RelationInterface
{
use IdAttribut,
SourceAttribut,
@@ -76,6 +76,6 @@ class Relation extends AbstractMeta implements RelationInterface
$this->law = new Law();
$this->parents = new ArrayCollection();
$this->childs = new ArrayCollection();
$this->law->setNode($this);
//$this->law->setNode($this);
}
}

View File

@@ -20,7 +20,7 @@ use App\Entity\Attribut\RelationAttribut;
* @ORM\Table(name="meta_right")
* @ORM\Entity(repositoryClass="App\Repository\RightRepository")
*/
class Right extends AbstractMeta implements RightInterface
final class Right extends AbstractMeta implements RightInterface
{
use TypeAttribut,LawAttribut, RelationAttribut, GrantAttribut,ConditionAttribut,RecieverGroupAttribut,LayerAttribut;