mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-10-31 09:19:08 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			33 lines
		
	
	
		
			599 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			599 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| namespace App\Entity\Attribut;
 | |
| 
 | |
| use App\Entity\PermissionInterface;
 | |
| use Doctrine\Common\Collections\Collection;
 | |
| 
 | |
| /**
 | |
|  * @author kevinfrantz
 | |
|  */
 | |
| trait PermissionsAttribut
 | |
| {
 | |
|     /**
 | |
|      * @var Collection
 | |
|      */
 | |
|     protected $permissions;
 | |
| 
 | |
|     public function setPermissions(Collection $permissions): void
 | |
|     {
 | |
|         $this->permissions = $permissions;
 | |
|     }
 | |
| 
 | |
|     public function getPermissions(): Collection
 | |
|     {
 | |
|         return $this->permissions;
 | |
|     }
 | |
| 
 | |
|     public function addPermission(PermissionInterface $permission): void
 | |
|     {
 | |
|         $this->permissions->add($permission);
 | |
|     }
 | |
| }
 |