mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 21:57:16 +02:00
Implemented Permission draft
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
@@ -6,11 +7,9 @@ use App\Entity\Attribut\TypeAttribut;
|
||||
use App\DBAL\Types\RightType;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Fresh\DoctrineEnumBundle\Validator\Constraints as DoctrineAssert;
|
||||
use App\Entity\Attribut\LawAttributInterface;
|
||||
use App\Entity\Attribut\LawAttribut;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author kevinfrantz
|
||||
* @ORM\Table(name="`right`")
|
||||
* @ORM\Entity(repositoryClass="App\Repository\RightRepository")
|
||||
@@ -18,26 +17,35 @@ use App\Entity\Attribut\LawAttribut;
|
||||
class Right extends AbstractEntity implements RightInterface
|
||||
{
|
||||
use TypeAttribut,LawAttribut;
|
||||
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="Law",cascade={"persist", "remove"})
|
||||
* @ORM\JoinColumn(name="law_id", referencedColumnName="id")
|
||||
*
|
||||
* @var LawInterface
|
||||
*/
|
||||
protected $law;
|
||||
|
||||
|
||||
/**
|
||||
* @ORM\Column(name="type", type="RightType", nullable=false)
|
||||
* @DoctrineAssert\Enum(entity="App\DBAL\Types\RightType")
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $type;
|
||||
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="Right", mappedBy="id", cascade={"persist", "remove"})
|
||||
*
|
||||
* @var ArrayCollection
|
||||
*/
|
||||
protected $permissions;
|
||||
|
||||
public function isGranted(NodeInterface $node): bool
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
||||
public function setPermissions(ArrayCollection $permissions): void
|
||||
{}
|
||||
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user