Ulozi rodice role
@param int $id
@param string $value
@throws AbortException
518378
public function setRoleParent(int $id, string $value): void
	{
		if ($this->isAjax()) {
			$role = $this->orm->aclRoles->getById($id);
			$role->parent = $value;
			$this->orm->persistAndFlush($role);

			$this->flashNotifier->success('default.dataSaved');
			$this['rolesList']->redrawItem($id);
		} else {
			$this->terminate();
		}
	}
892252
public function update($id, $key, $value=null)
     {
         $model =  $this->model->find($id);

         if (is_array($key))
             $model->update($key);
         else
             $model->{$key}= $value;

         $model->save();
     }
692456
public function set($id, $value) {
		// Format id
		$id = $this->_format($id);
		// Instantiate value
		if(!($value instanceof Value)) {
			$value = new Value($value);
		}
		// Set value
		if(isset($id)) {
			if(!isset($this->values[$id])) {
				$this->values[$id] = $value;
			}
			else {
				$this->values[$id]->setValue($value);
			}
		}
		else {
			$this->values[] = $value;
		}
	}
981202
public function setPermissionPrivilege(int $id, string $value): void
	{
		if ($this->isAjax()) {
			$permission = $this->orm->acl->getById($id);
			$permission->privilege = $value;
			$this->orm->persistAndFlush($permission);

			$this->flashNotifier->success('default.dataSaved');

			$this['permissionsList']->redrawItem($id);
		} else {
			$this->terminate();
		}
	}
995196
public function setValue(string $id, $value, bool $multi = false): self
    {
        return $this->set($id, new Definition\Value($value), $multi);
    }
1368722
public function set(/*# string */ $id, $value)/*# : bool */
    {
        if ($this->isWritable()) {
            $this->writable->set($id, $value);
            return $this->writable->has($id);
        } else {
            throw new LogicException(
                Message::get(Message::CONFIG_NOT_WRITABLE, $id),
                Message::CONFIG_NOT_WRITABLE
            );
        }
    }
620164
public function set($id, $value, $ttl = null, $nx = false)
    {
        if ($this->isTtlMode()) {
            $value = [
                static::ENTRY_VALUE      => $value,
                static::ENTRY_EXPIRATION => $this->calculateExpiresAt($ttl),
            ];
        } elseif (null !== $ttl) {
            throw new common_exception_NotImplemented('TTL not implemented in '.__CLASS__);
        }

        if ($nx) {
            throw new common_exception_NotImplemented('NX not implemented in '.__CLASS__);
        }

        return $this->writeFile($id, $value);
    }
551705
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();
		}
	}
610660
public function handleRemove(int $id) : void
    {
        if ($this->presenter->isAjax() && $this->presenter->user->isAllowed(CategoryAuthorizator::RES_REMOVE))
        {
            $this->categoryEntity = $this->categoryRepository->findOneById($id);

            $this->categoryManager->delete($this->categoryEntity);

            $this->presenter->notificationAjax(
                'Kategorie odstaněna',
                "Kategorie '{$this->categoryEntity->getName()}' byla úspěšně odstaněna.",
                'success',
                FALSE
            );

            $this->presenter->handleModalToggle('hide', '#wakers_category_remove_modal', FALSE);

            $this->onRemove();
        }
    }
742363
public function deleteRow(int $id) : void
    {
        $this->crudEnabled();

        // Generate the values
        $table_name = static::$table_name;
        $id_column = static::$id_column;

        $sql = "DELETE FROM {$table_name} WHERE {$id_column} = :key";
        $this->dbc->query($sql, ['params' => [':key' => $id]]);
    }
61978
public function handleChangeStatus($id, $key, $value)
	{
		if (empty($this->columns[$key])) {
			throw new DataGridException("ColumnStatus[$key] does not exist");
		}

		$this->columns[$key]->onChange($id, $value);
	}
1119470
public function set($id, $value, $lock = false)
    {
        parent::set($id, $value);

        if ((bool) $lock) {
            $this->lock($id);
        }
    }
843567
public static function event($value): void
    {
        if (false === self::message($value)) {
            throw new Exception\InvalidEvent($value);
        }
    }
52692
private function insertRecord(string $id, string $key, string $value) : void
    {
        $query = sprintf(
            'INSERT INTO %s (%s, %s, %s, %s) VALUES(?, ?, ?, ?)',
            $this->options['table-name'],
            $this->options['id-column'],
            $this->options['key-column'],
            $this->options['value-column'],
            $this->options['last-access-column']
        );

        $statement = $this->pdo->prepare($query);
        $statement->execute([$id, $key, $value, time()]);
    }
592966
public function setID($id)
    {
        if($id !== null && substr($id, 0, 1) !== '/')
            throw new Exception("invalid file id, must start with a /");
        $this->id = $id;
    }
774825
public function setPermissionResource(int $id, int $value): void
	{
		if ($this->isAjax()) {
			$acl = $this->orm->acl->getById($id);
			$acl->resource = $value;
			$this->orm->persistAndFlush($acl);

			$this->flashNotifier->success('default.dataSaved');

			$this['permissionsList']->redrawItem($id);
		} else {
			$this->terminate();
		}
	}
8681
@Override
    public void delete(final T value) {
        if (value != null) {
            final String id = value.getId();
            if (!StringUtils.isEmpty(id)) {
                doDelete(id);
                notifyDeleted(value);
            }
        }
    }