Updates input id and link it to its label

@return self|AbstractInput
174055
protected function updateInstance()
    {
        $this->instances++;
        $id = $this->generateId();
        $this->setAttribute($id, $id);
        if ($label = $this->getLabel()) {
            $label->setAttribute('for', $id);
        }
        
        return $this;
    }
1098035
protected function resetInput()
    {
        if ($this->minInput === 0) {
            $this->state = self::STATE_COMPLETE;
        } else {
            $this->state = self::STATE_TIMEOUT;
        }
        $this->input = self::DTMF_NONE;
        return $this;
    }
909496
public function getInputId()
	{
		$input = $this->getInput();

		/** @var Model $model */
		$model = $this->getModelClass();

		// If the model or the input is not set, then we cannot get an id.
		if (! $model || ! $input) {
			return null;
		}

		return array_get($input, (new $model)->getKeyName());
	}
350841
protected function getInput()
	{
		// Initialize variables.
		$html = array();
		$attr = '';

		// Initialize some field attributes.
		$attr .= $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : '';

		// To avoid user's confusion, readonly="true" should imply disabled="true".
		if ((string) $this->element['readonly'] == 'true' || (string) $this->element['disabled'] == 'true')
		{
			$attr .= ' disabled="disabled"';
		}

		$attr .= $this->element['size'] ? ' size="' . (int) $this->element['size'] . '"' : '';
		$attr .= $this->multiple ? ' multiple="multiple"' : '';

		// Initialize JavaScript field attributes.
		$attr .= $this->element['onchange'] ? ' onchange="' . (string) $this->element['onchange'] . '"' : '';

		// Get the field options.
		$options = (array) $this->getOptions();

		// Create a read-only list (no name) with a hidden input to store the value.
		if ((string) $this->element['readonly'] == 'true')
		{
			$html[] = Dropdown::genericlist($options, '', trim($attr), 'value', 'text', $this->value, $this->id);
			$html[] = '<input type="hidden" name="' . $this->name . '" value="' . htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') . '" />';
		}
		// Create a regular list.
		else
		{
			$html[] = Dropdown::genericlist($options, $this->name, trim($attr), 'value', 'text', $this->value, $this->id);

			if ($this->element['option_other'])
			{
				$found = false;

				foreach ($options as $option)
				{
					if ($option->value == $this->value)
					{
						$found = true;
					}
				}
				$html[] = '<input type="text" name="' . $this->getName($this->fieldname . '_other') . '" value="' . ($found ? '' : htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8')) . '" placeholder="' . (empty($this->placeholder) ?  App::get('language')->txt('Other...') : htmlspecialchars($this->placeholder, ENT_COMPAT, 'UTF-8')) . '" />';
			}
		}

		return implode($html);
	}
1157232
public function getInputId()
  {
    $n = false;
    if ($f = $this->getForm()) {
      $n = $f->getName();
    }

    return 'form-' . ($n ? $n . '-' : '') . $this->getField();
  }
674544
protected function getInput()
	{
		$html = array();
		$attr = '';

		// Initialize some field attributes.
		$attr .= $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : '';
		$attr .= ((string) $this->element['disabled'] == 'true') ? ' disabled="disabled"' : '';
		$attr .= $this->element['size'] ? ' size="' . (int) $this->element['size'] . '"' : '';
		$attr .= $this->multiple ? ' multiple="multiple"' : '';

		// Initialize JavaScript field attributes.
		$attr .= $this->element['onchange'] ? ' onchange="' . (string) $this->element['onchange'] . '"' : '';

		// Get the field groups.
		$groups = (array) $this->getGroups();

		// Create a read-only list (no name) with a hidden input to store the value.
		if ((string) $this->element['readonly'] == 'true')
		{
			$html[] = HtmlSelect::groupedlist(
				$groups,
				null,
				array(
					'list.attr' => $attr, 'id' => $this->id, 'list.select' => $this->value, 'group.items' => null, 'option.key.toHtml' => false,
					'option.text.toHtml' => false
				)
			);
			$html[] = '<input type="hidden" name="' . $this->name . '" value="' . $this->value . '"/>';
		}
		else
		// Create a regular list.
		{
			$html[] = HtmlSelect::groupedlist(
				$groups,
				$this->name,
				array(
					'list.attr' => $attr, 'id' => $this->id, 'list.select' => $this->value, 'group.items' => null, 'option.key.toHtml' => false,
					'option.text.toHtml' => false
				)
			);
		}

		return implode($html);
	}
1272477
public function label()
    {
        $attributes = $this->getLabelAttributes();
        if (array_key_exists('id', $attributes)) {
            $inputID = $attributes['id'];
            unset($attributes['id']);
        } else {
            $inputID = static::DEFAULT_INPUT_ID;
        }
        echo $this->formService->label($inputID, t('Please type the letters and numbers shown in the image. Click the image to see another captcha.'), $attributes);
    }
1305164
public function append($input): self {
        $this->manipulateNodesWithInput($input, function($node, $newNodes) {
            foreach ($newNodes as $newNode) {
                $node->appendChild($newNode);
            }
        });

        return $this;
    }
347357
protected function getInput()
	{
		// Initialize some field attributes.
		$class = $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : '';
		$disabled = ((string) $this->element['disabled'] == 'true') ? ' disabled="disabled"' : '';

		// Initialize JavaScript field attributes.
		$onchange = $this->element['onchange'] ? ' onchange="' . (string) $this->element['onchange'] . '"' : '';

		return '<input type="hidden" name="' . $this->name . '" id="' . $this->id . '"' . ' value="'
			. htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') . '"' . $class . $disabled . $onchange . ' />';
	}
861998
public function handleInputPublic()
    {
        try {
            $this->parseToken();
            $this->parseSourceId();
            $this->parseSource();
            $this->validateToken();
            $this->parseCampaignId();
            $this->parseCampaign();
            $this->parseSourceCampaignSettings();
        } catch (\Exception $exception) {
            $this->handleException($exception);
        }

        return $this;
    }
706606
public function update($id, $input)
    {
        $this->model = $this->model->query()->findOrFail($id);

        $this->model = $this->model->fill($input);

        $filteredInput = $this->runChecks('update', $this->model->toArray(), $this->model->getOriginal());

        if ($filteredInput) {
            $this->model->fill($filteredInput);
        }

        return $this->model->save();
    }
547846
protected function getInput()
	{
		// Initialize some field attributes.
		$size		= $this->element['size'] ? ' size="' . (int) $this->element['size'] . '"' : '';
		$maxLength	= $this->element['maxlength'] ? ' maxlength="' . (int) $this->element['maxlength'] . '"' : '';
		$class		= $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : '';
		$auto		= ((string) $this->element['autocomplete'] == 'off') ? ' autocomplete="off"' : '';
		$readonly	= ((string) $this->element['readonly'] == 'true') ? ' readonly="readonly"' : '';
		$disabled	= ((string) $this->element['disabled'] == 'true') ? ' disabled="disabled"' : '';

		// Temporary workaround to make sure the placeholder can be set without coupling to joomla/language
		$placeholder = '';

		if ($this->element['placeholder'])
		{
			try
			{
				$placeholder = ' placeholder="' . $this->getText()->translate((string) $this->element['placeholder']) . '"';
			}
			catch (\RuntimeException $e)
			{
				$placeholder = ' placeholder="' . (string) $this->element['placeholder'] . '"';
			}
		}

		return '<input type="password" name="' . $this->name . '" id="' . $this->id . '"' .
			' value="' . htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') . '"' .
			$auto . $class . $readonly . $disabled . $size . $maxLength . $placeholder . '/>';
	}
1318721
public function getInput() {
		if (!isset($this->input)) {
			switch ($this->method) {
			case 'POST':
				switch ($this->getContentType()) {
				case 'application/x-www-form-urlencoded':
				case 'multipart/form-data':
					$this->input = $_POST;
					break;

				default:
					$this->input = $this->getParamsFromInput();
					break;
				}
				break;

			case 'PUT':
			case 'DELETE':
				$this->input = $this->getParamsFromInput();
				break;

			default:
				$this->input = [];
				break;
			}
		}

		return $this->input;
	}
291340
protected function getInput()
	{
		$html = array();
		$attr = '';

		$select = new HtmlSelect;

		// Try to inject the text object into the field
		try
		{
			$select->setText($this->getText());
		}
		catch (\RuntimeException $exception)
		{
			// A Text object was not set, ignore the error and try to continue processing
		}

		// Initialize some field attributes.
		$attr .= $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : '';

		// To avoid user's confusion, readonly="true" should imply disabled="true".
		if ((string) $this->element['readonly'] == 'true' || (string) $this->element['disabled'] == 'true')
		{
			$attr .= ' disabled="disabled"';
		}

		$attr .= $this->element['size'] ? ' size="' . (int) $this->element['size'] . '"' : '';
		$attr .= $this->multiple ? ' multiple="multiple"' : '';

		// Initialize JavaScript field attributes.
		$attr .= $this->element['onchange'] ? ' onchange="' . (string) $this->element['onchange'] . '"' : '';

		// Get the field options.
		$options = (array) $this->getOptions();

		// Create a read-only list (no name) with a hidden input to store the value.
		if ((string) $this->element['readonly'] == 'true')
		{
			$html[] = $select->genericlist($options, '', trim($attr), 'value', 'text', $this->value, $this->id);
			$html[] = '<input type="hidden" name="' . $this->name . '" value="' . $this->value . '"/>';
		}
		else
		// Create a regular list.
		{
			$html[] = $select->genericlist($options, $this->name, trim($attr), 'value', 'text', $this->value, $this->id);
		}

		return implode($html);
	}
653140
protected function update()
    {
        $this->preUpdate();
        $this->data = $this->api->update($this->id, $this->data);
        $this->postUpdate();

        return $this;
    }
1105093
public function generateLabel()
    {
        if (($this->require_input) && ($this->value == '')) {
            $this->required = true;
        }
        return parent::generateLabel();
    }
1064410
public function updateActionPost() : object
    {
        $response = $this->di->get("response");
        $request = $this->di->get("request");
        $session = $this->di->get("session");
        $key = $request->getPost("stylechooser");

        if ($key === "none") {
            $session->set("flashmessage", "Unsetting the style and using deafult style.");
            $session->set(self::$key, null);
        } elseif (array_key_exists($key, $this->styles)) {
            $session->set("flashmessage", "Using the style '$key'.");
            $session->set(self::$key, $key);
        }

        return $response->redirect("style");
    }