public function setRoleName(int $id, string $value): void
	{
		if ($this->isAjax()) {
			$grid = $this['rolesList'];
			try {
				$role = $this->orm->aclRoles->getById($id);
				$role->setName($value);
				$this->orm->persistAndFlush($role);
				$this->flashNotifier->success('default.dataSaved');
			} catch (UniqueConstraintViolationException $ex) {
				$this->flashNotifier->error('cms.permissions.duplicityName');
				$grid->redrawItem($id);
			} catch (InvalidArgumentException $ex) {
				$this->flashNotifier->error('cms.permissions.invalidName');
				$grid->redrawItem($id);
			}
		} else {
			$this->terminate();
		}
	}
public function setRoleName(int $id, string $value): void
	{
		if ($this->isAjax()) {
			$grid = $this['rolesList'];
			try {
				$role = $this->orm->aclRoles->getById($id);
				$role->setName($value);
				$this->orm->persistAndFlush($role);
				$this->flashNotifier->success('default.dataSaved');
			} catch (UniqueConstraintViolationException $ex) {
				$this->flashNotifier->error('cms.permissions.duplicityName');
				$grid->redrawItem($id);
			} catch (InvalidArgumentException $ex) {
				$this->flashNotifier->error('cms.permissions.invalidName');
				$grid->redrawItem($id);
			}
		} else {
			$this->terminate();
		}
	}
public function setRoleName ( int $ id , string $ value ) : void { if ( $ this -> isAjax ( ) ) { $ grid = $ this [ 'rolesList' ] ; try { $ role = $ this -> orm -> aclRoles -> getById ( $ id ) ; $ role -> setName ( $ value ) ; $ this -> orm -> persistAndFlush ( $ role ) ; $ this -> flashNotifier -> success ( 'default.dataSaved' ) ; } catch ( UniqueConstraintViolationException $ ex ) { $ this -> flashNotifier -> error ( 'cms.permissions.duplicityName' ) ; $ grid -> redrawItem ( $ id ) ; } catch ( InvalidArgumentException $ ex ) { $ this -> flashNotifier -> error ( 'cms.permissions.invalidName' ) ; $ grid -> redrawItem ( $ id ) ; } } else { $ this -> terminate ( ) ; } }
Ulozi jmeno role
@param int $id
@param string $value
@throws AbortException
Ulozi jmeno role