Shortcut to set('href', 'javascript:void(0)').

@param string $value

@return Html instance
546507
public function scriptLink($value = 0)
    {
        $value = ($value !== 0) ? '\''.urlencode(htmlspecialchars($value)).'\'' : $value;

        return $this->set('href', 'javascript:void('.$value.');');
    }
1233788
public function setReturnUrlTarget($value)
    {
        switch ($value) {
            case '_top':
                $value = 1;
                break;

            case '_parent':
                $value = 2;
                break;

            case '_self':
                $value = 3;
                break;

            case '_blank':
                $value = 4;
                break;

            default:
                $value = (int)$value;
        }

        return $this->setParameter('returnUrlTarget', $value);
    }
909682
public function setValue(string $value) : RadioGroup
    {
        foreach ($this->radios as $radioButton) {
            $radioButton->setChecked($radioButton->getValue() === $value);
        }

        return $this;
    }
1222663
public function compile($value = "")
	{
		$html = $this->compiledLabel;

		if (!empty($this->help)) {
			$html .= "<div class='help'>{$this->help}</div>";
		}

		$html .= "<input type=\"{$this->type}\" name=\"{$this->name}\" {$this->compiledAttr} value=\"{$value}\" />";

		return $html;
	}
586931
protected function setValue($value)
    {
        if (!isset($this->value) || null === $this->value) {
            $this->value = $value;
        }

        return $this;
    }
523151
public function setValue($value)
    {
        $this->value = $value;
        if (is_string($value) && !empty($value)) {
            $value = Convert::json2array($value);
        } elseif (!is_array($value)) {
            $value = array($value);
        }

        $pattern = "/^{$this->getName()}\[(.*)\]$/";
        foreach ($this->children as $c) {
            $title = $c->getName();
            preg_match($pattern, $title, $matches);
            if (!empty($matches[1]) && isset($value[$matches[1]])) {
                $c->setValue($value[$matches[1]]);
            }
        }

        return $this;
    }
988394
public function setValue($value)
    {
        if (!is_array($value)) {
            $value = [];
        }
        foreach ($value as $key => $value) {
            if (!$this->getElement($key)) {
                continue;
            }
            $this->getElement($key)->setValue($value);
        }

        return $this;
    }
148868
public function setValue( $value ) {
		$this->value = $this->cleanUpValue( $value );
		$this->input->setValue( $this->value );
		return $this;
	}
192523
public function jsvar($name, $value = null)
    {
        if (is_string($name)) {
            $this->jsvalues[$name] = $value;
        }
        if (is_array($name)) {
            $this->jsvalues = array_merge($this->jsvalues, $name);
        }
        return $this;
    }
1277342
public function setPlaceholder(string $value = null): self
	{
		$this->setAttribute('placeholder', $value ?? $this->caption);
		return $this;
	}
847559
public function setText($value)
    {
        $this->text = $value;

        // Auto-convert into html.
        if (is_object($value) && stripos(get_class($value), 'HtmlGenerator\\Html')) {
            $this->text = (string) $value;
        }

        return $this;
    }
1211550
public function setValue( $value ) {
		if ( strtolower( $this->tag ) === 'textarea' ) {
			$this->clearContent();
			$this->appendContent( $value );
		} else {
			$this->setAttributes( [ 'value' => $value ] );
		}
		return $this;
	}
895854
public function setLinkedLeadsId($value)
    {
        if (!is_array($value)) {
            $value = [$value];
        }

        $this->values['linked_leads_id'] = $value;

        return $this;
    }
478870
public function setValue($value)
    {
        $this->_value = $value;
        $this->getInput()->setValue($value);
        return $this;
    }
51048
public function setModelAttribute($value)
    {
        $value = ! empty($value) ? array_map(function ($date) {
            return Carbon::createFromFormat($this->getPickerFormat(), $date);
        }, explode('::', $value)) : null;

        parent::setModelAttribute($value);
    }
424245
static public function urlencode($value)
    {
        if (is_string($value)) {
            return urlencode($value);
        } elseif (is_array($value)) {
            foreach ($value as $k => $v) {
                $value[$k] = static::urlencode($v);
            }
        }
        return $value;
    }
573735
public function setCorePhpthumbNohotlinkEraseImage($value)
    {
        $this->setFieldName('phpthumb_nohotlink_erase_image');
        $this->loadObject(true);
        $this->setFieldValue($value);

        return $this;
    }