Generates a control group with a file field.
@param string $name the input name.
@param string $value the input value.
@param array $htmlOptions additional HTML attributes.
@return string the generated control group.
@see self::controlGroup
969580
public static function dateFieldControlGroup($name, $value = '', $htmlOptions = array())
    {
        return self::controlGroup(self::INPUT_TYPE_DATE, $name, $value, $htmlOptions);
    }
196574
public function input($type, $name, $label = null, $value = null, array $options = [])
    {
        $label = $this->getLabelTitle($label, $name);

        $optionsField = $this->getFieldOptions(array_except($options, ['suffix', 'prefix']), $name);

        $inputElement = '';

         if(isset($options['prefix'])) {
            $inputElement = $options['prefix'];
        }

        $inputElement .= $type === 'password' ? $this->form->password($name, $optionsField) : $this->form->{$type}($name, $value, $optionsField);

         if(isset($options['suffix'])) {
            $inputElement .= $options['suffix'];
        }

         if(isset($options['prefix']) || isset($options['suffix'])) {
            $inputElement = '<div class="input-group">' . $inputElement . '</div>';
        }

        $wrapperOptions = $this->isHorizontal() ? ['class' => $this->getRightColumnClass()] : [];
        $wrapperElement = '<div' . $this->html->attributes($wrapperOptions) . '>' . $inputElement . $this->getFieldError($name) . $this->getHelpText($name, $optionsField) . '</div>';

        return $this->getFormGroup($name, $label, $wrapperElement);
    }
952739
public function staticField($name, $label = null, $value = null, array $options = [])
    {
        $options = array_merge(['class' => 'form-control-static'], $options);

        if (is_array($value) and isset($value['html'])) {
            $value = $value['html'];
        } else {
            $value = e($value);
        }

        $label = $this->getLabelTitle($label, $name);
        $inputElement = '<p' . $this->html->attributes($options) . '>' . $value . '</p>';

        $wrapperOptions = $this->isHorizontal() ? ['class' => $this->getRightColumnClass()] : [];
        $wrapperElement = '<div' . $this->html->attributes($wrapperOptions) . '>' . $inputElement . $this->getFieldError($name) . $this->getHelpText($name, $options) . '</div>';

        return $this->getFormGroup($name, $label, $wrapperElement);
    }
853750
public function setOption( $name, $value )
	{
		$this->jsWriter->setSeriesOption( $this->getTitle(), $name, $value );

		return $this;
	}
399342
public static function textFieldControlGroup($name, $value = '', $htmlOptions = array())
    {
        return self::controlGroup(self::INPUT_TYPE_TEXT, $name, $value, $htmlOptions);
    }
656565
public function setOption($name, $value) {
		$this->validateName($name);
		$this->config[$name] = $value;
	}
106956
public function setOption($name, $value) {
    if (!array_key_exists($name, $this->options)) {
      throw new InvalidArgumentException(sprintf('Undefined option: "%s"', $name));
    }

    $this->options[$name] = $value;
    $this->getHttpClient()->setOption($name, $value);
  }
230494
public function setOption($name, $value)
	{
		$this->assertOptionName($name);

		$this->options[$name] = $value;

		return $this;
	}
1338966
public static function email($name, $value = '', array $htmlOptions = [])
    {
        return self::input('email', $name, $value) . self::htmlOptions($htmlOptions) .'>';
    }
1064667
public function toOptions($name)
    {
        $html = '';
        foreach ($this->wei->getConfig($name) as $value => $text) {
            if (is_array($text)) {
                $html .= '<optgroup label="' . $value . '">';
                foreach ($text as $v => $t) {
                    $html .= '<option value="' . $v . '">' . $t . '</option>';
                }
                $html .= '</optgroup>';
            } else {
                $html .= '<option value="' . $value . '">' . $text . '</option>';
            }
        }
        return $html;
    }
1253091
private static function getHtmlAttribute(string $name, $value): string
    {
        if (!self::isset($value)) {
            return '';
        }

        if ($value === true) {
            return $name;
        }

        if (is_array($value)) {
            $value = self::convertAttributeArrayValue($name, $value);
        }

        return sprintf('%s="%s"', $name, static::escape((string) $value));
    }
1232943
public static function group($buttons, $htmlOptions = array())
    {
        ArrayHelper::addValue('class', 'button-group', $htmlOptions);

        ob_start();
        echo \CHtml::openTag('ul', $htmlOptions);
        foreach ($buttons as $button) {
            echo $button;
        }
        echo \CHtml::closeTag('ul');

        return ob_get_clean();
    }
439620
static public function kind($name, $value=null, $settings=[])
    {
        if (strpos($name, '[') === false) {
            $kind_type = $name;
            $name = '_kinds[' . $name . '][]';
        } else {
            $kind_type = preg_replace('/_(kinds\[)?(\w+)\]?\[\]/', '${2}', $name);
        }
        $settings = static::formatSettings($settings);
        $form_type = isset($settings['form_type']) ? trim($settings['form_type']) : 'checkbox_group';
        
        if ($form_type === 'modal') {
            $modal_url = isset($setting['modal_url']) ? $setting['modal_url'] : 'common/data/select/kind?kind_type=' . $kind_type;
            $settings['modal_url'] = Ioc::url($modal_url);
            $str = static::select($name, $value, $settings);
        } elseif ($form_type === 'select') {
            $str = static::select($name, $value, $settings);
        } else {
            $str = static::checkbox_group($name, $value, $settings);
        }
        
        return $str;
    }
864746
public function textarea($name, $value = null, $options = [])
    {
        return parent::textarea($name, $value, $this->appendErrors($name, $options));
    }
663603
public static function rangeFieldControlGroup($name, $value = '', $htmlOptions = array())
    {
        return self::controlGroup(self::INPUT_TYPE_RANGE, $name, $value, $htmlOptions);
    }
214629
public static function colorpicker($name, $value = null, $options = array())
	{
		static $done;

		if ($done === null)
		{
			$done = array();
		}

		$readonly = isset($options['readonly']) && $options['readonly'] == 'readonly';
		$disabled = isset($options['disabled']) && $options['disabled'] == 'disabled';

		$options['class'] = 'input-colorpicker';

		$value = $value ? '#' . ltrim($value, '#') : '';

		if (!$readonly && !$disabled)
		{
			$id = self::getIdAttribute($name, $options);

			// Only display the triggers once for each control.
			if (!in_array($id, $done))
			{
				// Load the calendar behavior
				Behavior::colorpicker();

				$done[] = $id;
			}

			return '<span class="input-color">' . self::text($name, $value, $options) . '</span>';
		}

		return self::text($name . 'disabled', $value, $options) . self::hidden($name, $value, $options);
	}
355686
public function setOption($name, $value)
    {
        $this->options[$name] = $value;
        $this->compiled = null;

        return $this;
    }