当前位置: 首页>>代码示例>>PHP>>正文


PHP FormBuilder::textarea方法代码示例

本文整理汇总了PHP中Collective\Html\FormBuilder::textarea方法的典型用法代码示例。如果您正苦于以下问题:PHP FormBuilder::textarea方法的具体用法?PHP FormBuilder::textarea怎么用?PHP FormBuilder::textarea使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Collective\Html\FormBuilder的用法示例。


在下文中一共展示了FormBuilder::textarea方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: textarea

 public function textarea($name, $value = null, $options = [])
 {
     return sprintf('
     <div class="input-field col l6 s8 offset-l3 offset-s2">
         %s
         %s
     </div>', parent::textarea($name, $value, ['class' => 'materialize-textarea']), parent::label($name, null, []));
 }
开发者ID:codificar,项目名称:scaffolder-theme-material,代码行数:8,代码来源:MaterialThemeForm.php

示例2: buildControl

 /**
  * Build all control with the css class, label, and input.
  *
  * @param       $type
  * @param       $name
  * @param null  $value
  * @param array $attributes
  * @param array $options
  * @return string
  */
 public function buildControl($type, $name, $value = null, $attributes = [], $options = [])
 {
     switch ($type) {
         case 'select':
             $options = ['' => config('field-builder.select')] + $options;
             return $this->form->select($name, $options, $value, $attributes);
         case 'password':
             return $this->form->password($name, $attributes);
         case 'checkbox':
             return $this->form->checkbox($name, $value, isset($attributes['checked']), $attributes);
         case 'textarea':
             return $this->form->textarea($name, $value, $attributes);
         case 'number':
             return $this->form->number($name, $value, $attributes);
         case 'radio':
             return $this->form->radio($name, $value, $attributes);
         case 'email':
             return $this->form->email($name, $value, $attributes);
         default:
             return $this->form->input($type, $name, $value, $attributes);
     }
 }
开发者ID:socieboy,项目名称:forms,代码行数:32,代码来源:FieldBuilder.php

示例3: textarea

 /**
  * Create a textarea input field.
  *
  * @param string $name
  * @param string $value
  * @param array $options
  * @return string 
  * @static 
  */
 public static function textarea($name, $value = null, $options = array())
 {
     return \Collective\Html\FormBuilder::textarea($name, $value, $options);
 }
开发者ID:alvarobfdev,项目名称:BaseCRUDproject,代码行数:13,代码来源:_ide_helper.php

示例4: plainTextarea

 /**
  * Create a plain textarea input field.
  *
  * @param  string $name
  * @param  string $value
  * @param  array  $options
  *
  * @return string
  */
 public function plainTextarea($name, $value = null, $options = [])
 {
     return parent::textarea($name, $value, $options);
 }
开发者ID:drickferreira,项目名称:enhanced-bootstrap-forms,代码行数:13,代码来源:FormBuilder.php

示例5: textarea

 /**
  * Create a textarea input field.
  *
  * @param  string $name
  * @param  string $value
  * @param  array $options
  * @return string
  */
 public function textarea($name, $value = null, $options = [])
 {
     return parent::textarea($name, $value, $this->appendErrors($name, $options));
 }
开发者ID:timothyvictor,项目名称:laravel5-foundation,代码行数:12,代码来源:FoundationFiveFormBuilder.php

示例6: textarea

 /**
  * @see Collective\Html\FormBuilder
  */
 public function textarea($name, $value = null, $options = [])
 {
     $options = $this->converter->convert(Helper::getFormAttribute($name)) + $options;
     return parent::textarea($name, $value, $options);
 }
开发者ID:laravel-ardent,项目名称:laravalid,代码行数:8,代码来源:FormBuilder.php

示例7: textarea

 public function textarea($name, $value = null, $options = [])
 {
     $options = $this->setOptionClasses($name, $options, ['form-control']);
     $controlOptions = $this->getControlOptions(collect($options));
     $controlHtml = parent::textarea($name, $value, $controlOptions->toArray());
     return $this->renderControl('textarea', $controlHtml, $name, $value, $options);
 }
开发者ID:genealabs,项目名称:laravel-casts,代码行数:7,代码来源:FormBuilder.php

示例8: textarea

 /**
  * {@inheritdoc}
  * @param string      $name       The name of the text area
  * @param string|null $value      The default value
  * @param array       $attributes The attributes of the text area
  * @return string
  */
 public function textarea($name, $value = null, $attributes = array())
 {
     $attributes['class'] = isset($attributes['class']) ? self::FORM_CONTROL . ' ' . $attributes['class'] : self::FORM_CONTROL;
     return parent::textarea($name, $value, $attributes);
 }
开发者ID:JaapMoolenaar,项目名称:bootstrapper,代码行数:12,代码来源:Form.php

示例9: textarea

 /**
  * Create a textarea input.
  *
  * @param  string  $name
  * @param  string  $value
  * @param  array   $options
  *
  * @return string
  */
 public function textarea($name, $value = null, $options = [])
 {
     $this->addErrorClass($name, $options);
     $tags['input'] = parent::textarea($name, $value, $options);
     $tags['error'] = $this->getErrorTag($name);
     return $this->buildTags($tags);
 }
开发者ID:nerea91,项目名称:laravel,代码行数:16,代码来源:Foundation.php

示例10: old

    $element = Form::textarea($name, $value ? $value : old($name), field_attributes($name, $attributes));
    return field_wrapper($name, $label, $element);
});
Form::macro('tinymce', function ($name, $label = NULL, $value = NULL, $attributes = []) {
    $attributes = array_merge($attributes, ['rows' => 4, 'data-tinymce' => 'true']);
    $element = Form::textarea($name, $value ? $value : old($name), field_attributes($name, $attributes));
    $element .= Form::hidden($name . '_text', $value ? $value : old($name), ['id' => $name . '_text']);
    return field_wrapper($name, $label, $element);
});
Form::macro('fileField', function ($name, $label = NULL, $attributes = []) {
    $element = '<p>' . Form::file($name, field_attributes($name, $attributes, true)) . '</p>';
    return field_wrapper($name, $label, $element);
});
Form::macro('textareaFieldClean', function ($name, $label = NULL, $value = NULL, $attributes = []) {
    $attributes = array_merge($attributes, ['placeholder' => $label, 'rows' => 4]);
    $element = Form::textarea($name, $value ? $value : old($name), field_attributes($name, $attributes));
    return form_group($element, $name);
});
Form::macro('selectFieldClean', function ($name, $label = NULL, $options, $value = NULL, $attributes = []) {
    $attributes = array_merge($attributes, ['placeholder' => $label]);
    $element = Form::select($name, $options, $value ? $value : old($name), field_attributes($name, $attributes));
    return form_group($element, $name);
});
Form::macro('selectizeClean', function ($name, $label = NULL, $options, $attributes = [], $value = NULL) {
    $attributes = array_merge($attributes, ['data-selectize' => 'true', 'placeholder' => $label]);
    $element = Form::select($name, $options, $value ? $value : old($name), field_attributes($name, $attributes));
    return form_group($element, $name);
});
Form::macro('selectize', function ($name, $label = NULL, $options = [], $attributes = [], $value = NULL) {
    $attributes = array_merge($attributes, ['data-selectize' => 'true']);
    $element = Form::select($name, $options, $value ? $value : old($name), field_attributes($name, $attributes));
开发者ID:brunoti,项目名称:html-macros,代码行数:31,代码来源:macros.php


注:本文中的Collective\Html\FormBuilder::textarea方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。