src/Component/AuthManager.php
public function addPermission(Permission $permission)
    {
        try {
            $this->saveEntity($permission);
        } catch (UniqueConstraintViolationException $e) {
            throw new NotUniqueException('Permission with name ' . $permission->getName() . ' already created');
        }
    }
public function addPermission(Permission $permission)
    {
        try {
            $this->saveEntity($permission);
        } catch (UniqueConstraintViolationException $e) {
            throw new NotUniqueException('Permission with name ' . $permission->getName() . ' already created');
        }
    }
public function addPermission ( Permission $ permission ) { try { $ this -> saveEntity ( $ permission ) ; } catch ( UniqueConstraintViolationException $ e ) { throw new NotUniqueException ( 'Permission with name ' . $ permission -> getName ( ) . ' already created' ) ; } }
Save permission in database
@param Permission $permission
@throws NotUniqueException
@throws DatabaseException
Save permission in database