Create html input element.

@param $key
@param $val

@return $this
558632
protected function input($key, $val)
    {
        $extra = [
            'type' => strtolower(__FUNCTION__),
        ];

        return $this->composeElement($key, $val, $extra, true);
    }
450003
protected function showHtmlAction($key, $table)
    {
        $html = $this->htmlCodeGenerator->generateHtml($key, $table);
        $this->view->assign('html', $html);
    }
876571
public function increment($key, $val = 1)
    {
        $this->lock = true;
        $v = $this->get($key);
        if (is_int($v)) {
            return $this->update($key, $v + abs(intval($val)));
        } else {
            $this->set($key, 1);
            return 1;
        }
    }
70181
public function pressKey($key)
    {
        $this->executor->execute(DriverCommand::SEND_KEYS_TO_ACTIVE_ELEMENT, [
            'value' => [(string) $key],
        ]);

        return $this;
    }
621949
public function addAttribute($key, $value = null)
    {
        $this->element->addAttribute($key, $value);

        return $this;
    }
988760
protected function createHtmlAction($key)
    {
        $html = $this->htmlCodeGenerator->generateHtml($key, 'tt_content');
        $this->saveHtml($key, $html);
        $this->redirect('list');
    }
1123385
public function add($key, $names, $val)
    {
        if (is_array($names)) {
            $array_piece = &$this->config[$key];
            foreach ($names as $name_key) {
                $array_piece = &$array_piece[$name_key];
            }

            return $array_piece = $val;
        } else {
            return $this->config[$key][$names] = $val;
        }
    }
834312
function set($key,$val) {
		$key=$this->fixheader($key);
		return $this->headers[$key]=$val;
	}
52387
public function set($key, $val = NULL): QueryBuilderInterface
	{
		if (is_scalar($key))
		{
			$pairs = [$key => $val];
		}
		else
		{
			$pairs = $key;
		}

		$keys = array_keys($pairs);
		$values = array_values($pairs);

		$this->state->appendSetArrayKeys($keys);
		$this->state->appendValues($values);

		// Use the keys of the array to make the insert/update string
		// Escape the field names
		$this->state->setSetArrayKeys(
			array_map([$this->driver, '_quote'], $this->state->getSetArrayKeys())
		);

		// Generate the "set" string
		$setString = implode('=?,', $this->state->getSetArrayKeys());
		$setString .= '=?';

		$this->state->setSetString($setString);

		return $this;
	}
839071
function update( $key, $val = false ) {
			if ( ! is_array( $key ) ) {
				$key = array( $key => $val );
			}

			$is_updated = false;

			foreach ( $key as $k => $v ) {
				if ( $this->{$k} === $v ) {
					continue;
				}

				if ( ( is_string( $this->{$k} ) && is_numeric( $v ) ||
				       ( is_numeric( $this->{$k} ) && is_string( $v ) ) ) &&
				     $this->{$k} == $v
				) {
					continue;
				}

				// Update value.
				$this->{$k} = $v;

				$is_updated = true;
			}

			$this->_is_updated = $is_updated;

			return $is_updated;
		}
1040449
public function set($key, $val)
    {
        if (!$this->locked) {
            $this->options[$key] = $val;
        }

        return $this;
    }
490767
protected function innerSet($key, $val)
    {
        $setMethod = 'set' . ucfirst($key);
        if ( !in_array($key, $this->notsetters()) && method_exists($this, $setMethod) ) {
            $this->$setMethod($val);
        } else {

            $validateMethod = 'validate' . ucfirst($key);

            if (method_exists($this, $validateMethod)) {

                $errors = new Exceptions();

                try {
                    $validateResult = $this->$validateMethod($val);
                    if (false === $validateResult) {
                        return;
                    }
                    if ($validateResult instanceof \Generator) {
                        foreach ($validateResult as $error) {
                            if ($error instanceof \Throwable) {
                                $errors->add($error);
                            }
                        }
                    }
                } catch (\Throwable $e) {
                    $errors->add($e);
                }

                if (!$errors->empty()) {
                    throw $errors;
                }

            }

            $sanitizeMethod = 'sanitize' . ucfirst($key);
            if (method_exists($this, $sanitizeMethod)) {
                $val = $this->$sanitizeMethod($val);
            }

            if (null === $key) {
                $this->__data[] = $val;
            } else {
                $this->__data[$key] = $val;
            }
        }
    }
899523
public function prepend($html, $key = null)
    {
        $this->each(function ($item) use ($html) {
            $item->title = $html.$item->title;
        });

        return $this;
    }
604160
public function attr(string $name, $val=null)
    {
        if ($val !== null) { // set attribute for all nodes
            foreach ($this->getElements() as $node) {
                $node->setAttribute($name, $val);
            }
            return $this;
        }
        if ($node = $this->getFirstElmNode()) { // get attribute value for first element
            return $node->getAttribute($name);
        }
    }
1144920
public function setDefaultData($key, $val = null)
    {
        if(is_array($key))
        {
            foreach($key as $k=>$v)
            {
                $this->setDefaultData($k, $v);
            }
        }
        else
        {
            $this->defaultData[$key] = $val;
        }

        return $this;
    }
974392
public function addPickerOption($key, $val)
    {
        if (!is_string($key)) {
            throw new InvalidArgumentException(
                'Setting key must be a string.'
            );
        }

        // Make sure default options are loaded.
        if ($this->pickerOptions === null) {
            $this->pickerOptions();
        }

        $this->pickerOptions[$key] = $val;

        return $this;
    }
1367713
public function withAttribute(string $key, $value): ElementInterface
    {
        if ($key === 'value' && is_array($value)) {
            $this->withData($value);
        }

        parent::withAttribute($key, $value);

        return $this;
    }