mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-14 06:07:18 +02:00
Implemented Permission draft
This commit is contained in:
24
application/src/Entity/Attribut/BlacklistAttribut.php
Normal file
24
application/src/Entity/Attribut/BlacklistAttribut.php
Normal 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;
|
||||
}
|
||||
}
|
@@ -1,10 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Attribut;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*
|
||||
*/
|
||||
interface BlacklistAttributInterface
|
||||
{
|
||||
@@ -12,4 +11,3 @@ interface BlacklistAttributInterface
|
||||
|
||||
public function getBlacklist(): ?bool;
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
24
application/src/Entity/Attribut/WhitelistAttribut.php
Normal file
24
application/src/Entity/Attribut/WhitelistAttribut.php
Normal 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;
|
||||
}
|
||||
}
|
@@ -1,15 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Entity\Attribut;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*
|
||||
*/
|
||||
interface WhitelistAttributInterface
|
||||
{
|
||||
public function setWhitelist(?bool $value): void;
|
||||
|
||||
|
||||
public function getWhitelist(): ?bool;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user