Generates an HTML Textarea using TinyMCE
@param $name
@param null $value
@param array $htmlOptions
@param string $tinyMCETemplate
@return string
357000
public function htmlTextarea($name, $value = null, $htmlOptions = array(), $tinyMCETemplate = 'basic')
    {
        $r = Html::get()->mpfScriptFile('jquery.js') . Html::get()->mpfScriptFile('tinymce/tinymce.min.js') . Html::get()->mpfScriptFile('tinymce/jquery.tinymce.min.js');
        if (!isset($htmlOptions['id'])) {
            $htmlOptions['id'] = 'tinymce_' . uniqid();
        }
        $htmlOptions['class'] = (isset($htmlOptions['class']) ? $htmlOptions['class'] . ' ' : '') . 'input tinymce-textarea';
        $r .= $this->textarea($name, $value, $htmlOptions);
        $options = json_encode($this->tinyMCEOptionTemplates[$tinyMCETemplate]);
        $r .= Html::get()->script("$('#{$htmlOptions['id']}').tinymce($options)");
        return $r;
    }
1091156
public static function textAreaControlGroup($name, $value = '', $htmlOptions = array())
    {
        return self::controlGroup(self::INPUT_TYPE_TEXTAREA, $name, $value, $htmlOptions);
    }
548512
public function optionModeNoValue($name, $description)
    {
        $shortcut = null;
        $mode = InputOption::VALUE_NONE;
        return [$name, $shortcut, $mode, $description, $defaultValue = null];
    }
1067668
public function input($type, $name, $value = null, $options = array())
    {
        if ( ! isset($options['name'])) $options['name'] = $name;

        // We will get the appropriate value for the given field. We will look for the
        // value in the session for the value in the old input data then we'll look
        // in the model instance if one is set. Otherwise we will just use empty.
        $id = $this->getIdAttribute($name, $options);

        if ( ! in_array($type, $this->skipValueTypes))
        {
            $value = $this->getValueAttribute($name, $value);
        }

        // Once we have the type, value, and ID we can merge them into the rest of the
        // attributes array so we can convert them into their HTML attribute format
        // when creating the HTML element. Then, we will return the entire input.
        $merge = compact('type', 'value', 'id');

        $options = array_merge($options, $merge);

        return '<input'.$this->html->attributes($options).'>';
    }
362245
public static function activeTextArea($model, $attribute, $htmlOptions = array())
    {
        $htmlOptions = self::normalizeInputOptions($htmlOptions);
        return parent::activeTextArea($model, $attribute, $htmlOptions);
    }
1038986
public static function input($type, $name, $value = null, array $attributes = array())
    {
        if ($type === 'textarea') {
            $input = '<textarea{{attr}}>';

            if ($value !== null) {
                $input .= self::entities($value);
            }

            $input .= '</textarea>';
        } elseif (preg_match('#^(' . self::$alloweds . ')$#', $type)) {
            $input = '<input type="' . $type . '" value="';

            if ($value !== null) {
                $input .= self::entities($value);
            }

            $input .= '"{{attr}}' . self::$useXhtml . '>';
        } else {
            throw new Exception('Invalid type');
        }

        return self::setAttr($attributes, $input, $name, $type);
    }
969580
public static function dateFieldControlGroup($name, $value = '', $htmlOptions = array())
    {
        return self::controlGroup(self::INPUT_TYPE_DATE, $name, $value, $htmlOptions);
    }
1244609
public static function customControlGroup($input, $name, $htmlOptions = array())
    {
        $htmlOptions['input'] = $input;
        return self::controlGroup(self::INPUT_TYPE_CUSTOM, $name, '', $htmlOptions);
    }
60044
public function createTextHeader($name, $value = null)
    {
        $header = new Swift_Mime_Headers_UnstructuredHeader($name, $this->encoder);
        if (isset($value)) {
            $header->setFieldBodyModel($value);
        }
        $this->setHeaderCharset($header);

        return $header;
    }
1326916
public function markdown($name = null, $value = null) 
	{
		Argument::i()
			->test(1, 'string', 'null')
			->test(2, 'scalar', 'null');
			
		$field = Markdown::i();
		
		if(!is_null($name)) {
			$field->setName($name);
		}
		
		if(!is_null($value)) {
			$field->setValue($value);
		}
		
		return $field;
	}
494639
public function textarea(String $name = NULL, String $value = NULL, Array $_attributes = [])
    {
        $this->setNameAttribute($name);

        $this->setValueAttribute($value);

        if( ! empty($this->settings['attr']['name']) )
        {
            $this->_postback($this->settings['attr']['name'], $value);

            # 5.8.2.8[added]
            $this->getVMethodMessages();

            # 5.4.2[added]
            $this->_validate($this->settings['attr']['name'], $this->settings['attr']['name']);
            
            # 5.4.2[added]|5.4.5|5.4.6[edited]
            $value = $this->_getrow('textarea', $value, $this->settings['attr']);
        }

        $this->commonMethodsForInputElements('textarea');

        $this->getPermAttribute($perm);

        $this->createTextareaElementByValueAndAttributes($value, $_attributes, $return);

        $this->createBootstrapFormInputElementByType('textarea', $return, $_attributes, $return);

        $this->outputElement .= $this->_perm($perm, $return);

        return $this;
    }
378393
static public function textarea($name, $value=null, $settings=[])
    {
        $settings = static::formatSettings($settings);
        $settings['class'] = isset($settings['class']) ? $settings['class'] . ' form-control' : ' form-control';
        $settings['id'] = isset($settings['id']) ? static::formatId($settings['id']) : static::formatId($name);
        
        $str = '<textarea name="' . $name . '" style="min-height:100px;"';
        foreach($settings as $k => $v) {
            if (in_array($k, array('class', 'id', 'readonly', 'rows', 'style', 'placeholder'))) {
                $str .= " $k=\"$v\"";
            }
        }
        $str .= '>';
        $str .= (isset($value) ? trim($value) : '') . '</textarea>' . PHP_EOL;
        return $str;
    }
387899
public static function label($name, $value = null, array $options = [])
    {
        self::exclure($options, ['value', 'for']);

        self::$labels[] = $name;

        $value = e(self::formatLabel($name, $value));

        $options = Html::attributes($options);

        return '<label for="'.$name.'"'.$options.'>'.$value.'</label>';
    }
897438
public function textArea($model, $attribute, $htmlOptions = array())
    {
        return $this->createInput(TbHtml::INPUT_TYPE_TEXTAREA, $model, $attribute, $htmlOptions);
    }
23554
public function input($name, $options = array())
    {
        $options += array(
            "type"  => "text",
            "id"    => $this->id($name),
            "name"  => $this->name($name),
            "error" => true,
            "class" => "",
            "value" => "",
            "label" => null
        );

        $currentValue = $this->getCurrentValue($options['name']);

        $errorHtml = "";
        $fieldHasErrors = false;

        if (!is_null($this->associatedEntity)) {
            // Checkboxes may be posted has data[name][0] and therefore
            // we need to remove it to get the absolute field name.
            $validationName = $options["type"] === "checkbox" ?
                preg_replace('/\[\d+\]$/', '', $name) :
                $name;

            if ($this->associatedEntity->hasErrors($validationName)) {
                if ((bool)$options['error']) {
                    $errorHtml = $this->generateInlineErrors($validationName);
                }
                $fieldHasErrors = true;
                $options['class'] .= " error ";
            }
        }
        unset($options["error"]);

        $label = "";
        if (!is_null($options['label'])) {
            $labelOptions = array(
                "for"    => $options["id"],
                "class" => $fieldHasErrors ? "error" : "",
                "label" => $options["label"],
            );

            $label .= $this->label($options['name'], $labelOptions);
        }
        unset($options['label']);

        switch (strtolower($options['type'])) {
            case "textarea":
                return $label . "\n" . $this->generateTextarea($options, $currentValue) . $errorHtml . "\n";
            case "select":
                return $label . "\n" . $this->generateSelect($options, $currentValue) . $errorHtml . "\n";
            case "radio":
                return $this->generateRadio($options, $currentValue) . $errorHtml . "\n" . $label . "\n";
            case "checkbox":
                return $this->generateCheckbox($options, $currentValue) . $errorHtml . "\n" . $label . "\n";
            case "hidden":
                return $label . "\n" . $this->generateHidden($options, $currentValue) . $errorHtml . "\n";
            default:
                return $label . "\n" . $this->generateTextinput($options, $currentValue) . $errorHtml . "\n";
        }
    }
838882
public function text($name, $options = [])
    {
        $requiredClass = (isset($options['required']) && $options['required'] == true) ? 'required ' : '';
        $hasError = $this->errorBag->has($this->formatArrayName($name));
        $hasErrorClass = $hasError ? 'has-error' : '';
        $htmlForm = '<div class="form-group '.$requiredClass.$hasErrorClass.'">';

        $htmlForm .= $this->setFormFieldLabel($name, $options);

        if (isset($options['addon'])) {
            $htmlForm .= '<div class="input-group">';
        }
        if (isset($options['addon']['before'])) {
            $htmlForm .= '<span class="input-group-prepend"><div class="input-group-text">'.$options['addon']['before'].'</div></span>';
        }

        $type = isset($options['type']) ? $options['type'] : 'text';
        $value = isset($options['value']) ? $options['value'] : null;
        $fieldAttributes = $this->getFieldAttributes($options);

        if (isset($options['placeholder'])) {
            $fieldAttributes += ['placeholder' => $options['placeholder']];
        }

        if ($hasError) {
            $fieldAttributes['class'] .= ' is-invalid';
        }

        $htmlForm .= FormFacade::input($type, $name, $value, $fieldAttributes);

        if (isset($options['addon']['after'])) {
            $htmlForm .= '<span class="input-group-append"><div class="input-group-text">'.$options['addon']['after'].'</div></span>';
        }
        if (isset($options['addon'])) {
            $htmlForm .= '</div>';
        }

        $htmlForm .= $this->getInfoTextLine($options);

        $htmlForm .= $this->errorBag->first($this->formatArrayName($name), '<span class="invalid-feedback" role="alert">:message</span>');

        $htmlForm .= '</div>';

        return $htmlForm;
    }
76066
public function label($name, $value = null, array $options = [])
    {
        $options = $this->getLabelOptions($options);

        $escapeHtml = false;

        if (is_array($value) and isset($value['html'])) {
            $value = $value['html'];
        } elseif ($value instanceof HtmlString) {
            $value = $value->toHtml();
        } else {
            $escapeHtml = true;
        }

        return $this->form->label($name, $value, $options, $escapeHtml);
    }