Ulozi jmeno role
@param int $id
@param string $value
@throws AbortException
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();
		}
	}
29071
protected function bindFactory($id, callable $value)
    {
        $this->bind($id, $this->container->factory($value));
    }
153509
public function setRoleTitle(int $id, string $value): void
	{
		if ($this->isAjax()) {
			$role = $this->orm->aclRoles->getById($id);
			$role->title = $value;
			$this->orm->persistAndFlush($role);

			$this->flashNotifier->success('default.dataSaved');
		} else {
			$this->terminate();
		}
	}
110741
public function toggleCheckboxes($id, $value = null, array $params = array())
    {

        $js = sprintf('%1$s("#%2$s").click(function(){
            var checkboxes = %1$s("%3$s");
            checkboxes.prop("checked", !checkboxes.prop("checked"));
});',
                \ZendX_JQuery_View_Helper_JQuery::getJQueryHandler(),
                $id,
                $params['selector']
        );
        unset($params['selector']);

        $this->jquery->addOnLoad($js);

        //Now do something to add the jquery stuff
        return $this->view->formButton($id, $value, $params);
    }
873682
public function set($id, $value) : Slot
    {
        $this->offsetSet($id, $value);
        return $this->slot($id);
    }
314844
public function inc($id, $value = 1) {
		$event  = $this->getProfiler()->startWrite('Inc: ' . $id);
		$result = $this->getBackend()->inc($id, $value);
		
		if ($result === false) {
			$event->stopError();
		} else {
			$event->stopSuccess();
		}
		
		return $result;
	}
1586
public function dec($id, $value = 1) {
		if (! $this->connectionCheckStatus) {
			$this->addServer();
		}
		
		$id     = $this->prepareId($id);
		$result = $this->getClient()->decrement($id, $value);
		
		if ($result === false && $this->operationsExceptions) {
			throw new OperationFailed('Decrementing of the data in the cache failed, ID: "' . $id . '"');
		}
		
		return $result;
	}
1154868
public function setId(int $value) : Permission
    {

        if ($this->data['id'] !== $value) {
            $this->data['id'] = $value;
            $this->setModified('id');
        }

        return $this;
    }
336782
public function push_back($value)
    {
        if ($this->isValidType($value) === false) {
            throw new MWrongTypeException("\$value", $this->getType(), $value);
        }

        $this->list[] = $value;
    }
159646
public function saveField($id, $field, $value) {
		$entity = [
			'id' => $id,
			$field => $value
		];
		return $this->saveArray($entity, ['accessibleFields' => ['id' => true]]);
	}
381820
public function setAttorney(\AgentSIB\Diadoc\Api\Proto\Invoicing\Attorney $value = null)
    {
        $this->Attorney = $value;
    }
751338
public function where1v1($id, $value)
    {
        list($id_a, $id_b) = explode(',', $id);

        if (($pos = strpos($value, ',')) === false) {
            /** @noinspection CallableParameterUseCaseInTypeContextInspection */
            $value = $this->normalizeValue($id_a, $value);
            $this->_filters[] = ['$or' => [[$id_a => $value], [$id_b => $value]]];
        } else {
            $value_a = $this->normalizeValue($id_a, substr($value, 0, $pos));
            $value_b = $this->normalizeValue($id_b, substr($value, $pos + 1));
            $this->_filters[] = ['$or' => [[$id_a => $value_a, $id_b => $value_b], [$id_a => $value_b, $id_b => $value_a]]];
        }

        return $this;
    }
674105
public function setUserId(int $value) : Permission
    {

        // As this column is a foreign key, empty values should be considered null.
        if (empty($value)) {
            $value = null;
        }


        if ($this->data['user_id'] !== $value) {
            $this->data['user_id'] = $value;
            $this->setModified('user_id');
        }

        return $this;
    }
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;
		}
	}
1341010
public static function command($value): void
    {
        if (false === self::message($value)) {
            throw new Exception\InvalidCommand($value);
        }
    }
907206
public function handleDelete(int $id): void
	{
		if ($this->isAjax() && $this->editConst) {
			$content = $this->orm->content->getById($id);
			$this->orm->content->removeAndFlush($content);
			$this['list']->reload();
		} else {
			$this->terminate();
		}
	}
421510
public function handle($request, Closure $next, $value)
    {
        if (!\Auth::user()->hasRole($value)) {
            app()->abort(403, 'Missing role \''.$value.'\'');
        }

        return $next($request);
    }