mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-10-31 17:29:04 +00:00 
			
		
		
		
	Optimized Facade
This commit is contained in:
		| @@ -6,10 +6,11 @@ use App\Entity\Attribut\IdAttributInterface; | ||||
| use App\Entity\EntityInterface; | ||||
| use App\Entity\Source\Attribut\GroupSourcesAttributInterface; | ||||
| use App\Entity\Attribut\LawAttributInterface; | ||||
| use App\Entity\Attribut\RelationAttributInterface; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|  */ | ||||
| interface SourceInterface extends IdAttributInterface, EntityInterface, GroupSourcesAttributInterface, LawAttributInterface | ||||
| interface SourceInterface extends IdAttributInterface, EntityInterface, GroupSourcesAttributInterface, LawAttributInterface, RelationAttributInterface | ||||
| { | ||||
| } | ||||
|   | ||||
| @@ -2,11 +2,12 @@ | ||||
|  | ||||
| namespace App\Structur\Facade\Security\Source; | ||||
|  | ||||
| use App\Entity\NodeInterface; | ||||
| use App\Entity\Source\SourceInterface; | ||||
| use App\Entity\User; | ||||
| use App\DBAL\Types\RightType; | ||||
| use App\DBAL\Types\LayerType; | ||||
| use App\Entity\Meta\RelationInterface; | ||||
| use App\Entity\Meta\Relation; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
| @@ -40,7 +41,7 @@ abstract class AbstractSourceFacade implements SourceFacadeInterface | ||||
|         throw \Exception("The id can't be changed!"); | ||||
|     } | ||||
|  | ||||
|     public function setNode(NodeInterface $node): void | ||||
|     public function setRelation(RelationInterface $relation): void | ||||
|     { | ||||
|         throw \Exception("The node can't be changed!"); | ||||
|     } | ||||
| @@ -52,7 +53,7 @@ abstract class AbstractSourceFacade implements SourceFacadeInterface | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     public function getNode(): NodeInterface | ||||
|     public function getRelation(): Relation | ||||
|     { | ||||
|         if ($this->isGranted(RightType::READ, LayerType::NODE)) { | ||||
|             return $source->getNode(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user