Implemented Permission draft

This commit is contained in:
Kevin Frantz
2018-09-13 16:51:58 +02:00
parent 92886a14ce
commit 69f2beac72
28 changed files with 203 additions and 143 deletions

View File

@@ -0,0 +1,24 @@
<?php
namespace App\Entity\Attribut;
/**
* @author kevinfrantz
*/
trait BlacklistAttribut
{
/**
* @var bool
*/
protected $blacklist;
public function setBlacklist(?bool $value): void
{
$this->blacklist = $value;
}
public function getBlacklist(): ?bool
{
return $this->blacklist;
}
}

View File

@@ -1,10 +1,9 @@
<?php
namespace App\Entity\Attribut;
/**
*
* @author kevinfrantz
*
*/
interface BlacklistAttributInterface
{
@@ -12,4 +11,3 @@ interface BlacklistAttributInterface
public function getBlacklist(): ?bool;
}

View File

@@ -1,26 +1,26 @@
<?php
namespace App\Entity\Attribut;
use App\Entity\LawInterface;
/**
*
* @author kevinfrantz
*
*/
trait LawAttribut {
/**
trait LawAttribut
{
/**
* @var LawInterface
*/
protected $law;
public function setLaw(LawInterface $law):void{
public function setLaw(LawInterface $law): void
{
$this->law = $law;
}
public function getLaw(): LawInterface{
public function getLaw(): LawInterface
{
return $this->law;
}
}

View File

@@ -1,18 +1,15 @@
<?php
namespace App\Entity\Attribut;
use App\Entity\LawInterface;
/**
*
* @author kevinfrantz
*
*/
interface LawAttributInterface
{
public function setLaw(LawInterface $law):void;
public function setLaw(LawInterface $law): void;
public function getLaw(): LawInterface;
}

View File

@@ -1,17 +1,15 @@
<?php
namespace App\Entity\Attribut;
use App\Entity\RightInterface;
/**
*
* @author kevinfrantz
*
*/
interface RightAttributInterface
{
public function setRight(RightInterface $right):void;
public function getRight():RightInterface;
}
public function setRight(RightInterface $right): void;
public function getRight(): RightInterface;
}

View File

@@ -1,17 +1,15 @@
<?php
namespace App\Entity\Attribut;
use Doctrine\Common\Collections\ArrayCollection;
/**
*
* @author kevinfrantz
*
*/
interface RightsAttributInterface
{
public function setRights(ArrayCollection $rights):void;
public function getRights():ArrayCollection;
}
public function setRights(ArrayCollection $rights): void;
public function getRights(): ArrayCollection;
}

View File

@@ -1,26 +1,26 @@
<?php
namespace App\Entity\Attribut;
use Doctrine\Common\Collections\ArrayCollection;
/**
*
* @author kevinfrantz
*
*/
trait RightsAttribute {
trait RightsAttribute
{
/**
* @var ArrayCollection
*/
protected $rights;
public function setRights(ArrayCollection $rights):void{
public function setRights(ArrayCollection $rights): void
{
$this->rights = $rights;
}
public function getRights():ArrayCollection{
public function getRights(): ArrayCollection
{
return $this->rights;
}
}

View File

@@ -1,24 +1,24 @@
<?php
namespace App\Entity\Attribut;
/**
*
* @author kevinfrantz
*
*/
trait TypeAttribut {
trait TypeAttribut
{
/**
*
* @var string
*/
protected $type;
public function setType(string $type):void{
public function setType(string $type): void
{
$this->type = $type;
}
public function getType():string{
public function getType(): string
{
return $this->type;
}
}

View File

@@ -1,15 +1,13 @@
<?php
namespace App\Entity\Attribut;
/**
*
* @author kevinfrantz
*
*/
interface TypeAttributInterface
{
public function setType(string $type):void;
public function getType():string;
}
public function setType(string $type): void;
public function getType(): string;
}

View File

@@ -1,26 +1,26 @@
<?php
namespace App\Entity\Attribut;
use App\Entity\User;
/**
*
* @author kevinfrantz
*
*/
trait UserAttribut {
trait UserAttribut
{
/**
* @var User
*/
protected $user;
public function setUser(User $user):void{
public function setUser(User $user): void
{
$this->user = $user;
}
public function getUser():User{
public function getUser(): User
{
return $this->user;
}
}

View File

@@ -1,17 +1,15 @@
<?php
namespace App\Entity\Attribut;
use App\Entity\User;
/**
*
* @author kevinfrantz
*
*/
interface UserAttributInterface
{
public function setUser(User $user):void;
public function getUser():User;
}
public function setUser(User $user): void;
public function getUser(): User;
}

View File

@@ -1,28 +1,28 @@
<?php
namespace Entity\Attribut;
use App\Entity\UserSourceInterface;
/**
*
* @author kevinfrantz
*
*/
trait UserSource {
trait UserSource
{
/**
*
* @var UserSourceInterface
* @ORM\OneToOne(targetEntity="UserSource",cascade={"persist", "remove"})
* @ORM\JoinColumn(name="source_user_id", referencedColumnName="id")
*/
protected $userSource;
public function setUserSource(UserSourceInterface $userSource):void{
public function setUserSource(UserSourceInterface $userSource): void
{
$this->user = $userSource;
}
public function getUserSource():UserSourceInterface{
public function getUserSource(): UserSourceInterface
{
return $this->userSource;
}
}

View File

@@ -1,17 +1,15 @@
<?php
namespace Entity\Attribut;
use App\Entity\UserSourceInterface;
/**
*
* @author kevinfrantz
*
*/
interface UserSourceAttributInterface
{
public function setUserSource(UserSourceInterface $user):void;
public function getUserSource():UserSourceInterface;
}
public function setUserSource(UserSourceInterface $user): void;
public function getUserSource(): UserSourceInterface;
}

View File

@@ -0,0 +1,24 @@
<?php
namespace App\Entity\Attribut;
/**
* @author kevinfrantz
*/
trait WhitelistAttribut
{
/**
* @var bool
*/
protected $whitelist;
public function setWhitelist(?bool $value): void
{
$this->whitelist = $value;
}
public function getWhitelist(): ?bool
{
return $this->whitelist;
}
}

View File

@@ -1,15 +1,13 @@
<?php
namespace Entity\Attribut;
/**
*
* @author kevinfrantz
*
*/
interface WhitelistAttributInterface
{
public function setWhitelist(?bool $value): void;
public function getWhitelist(): ?bool;
}