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


PHP FormBuilder::input方法代码示例

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


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

示例1: commonInputs

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

示例2: file

 /**
  * Create a Boostrap file upload button.
  *
  * @param  string  $name
  * @param  string  $label
  * @param  array   $options
  * @return string
  */
 public function file($name, $label = null, array $options = [], $extra = null)
 {
     $label = $this->getLabelTitle($label, $name);
     $options = array_merge(['class' => 'filestyle', 'data-buttonBefore' => 'true'], $options);
     $options = $this->getFieldOptions($options, $name);
     $inputElement = $this->form->input('file', $name, null, $options);
     $wrapperOptions = $this->isHorizontal() ? ['class' => $this->getRightColumnClass()] : [];
     $wrapperElement = '<div' . $this->html->attributes($wrapperOptions) . '>' . $inputElement . $this->getFieldError($name) . '</div>';
     return $this->getFormGroupWithLabel($name, $label, $wrapperElement, $extra);
 }
开发者ID:jor3l,项目名称:bootstrap-form,代码行数:18,代码来源:BootstrapForm.php

示例3: file

 /**
  * Create a Boostrap file upload button.
  *
  * @param  string  $name
  * @param  string  $label
  * @param  array   $options
  * @return string
  */
 public function file($name, $label = null, array $options = [])
 {
     $label = $this->getLabelTitle($label, $name);
     $options = array_merge(['class' => 'filestyle', 'data-buttonBefore' => 'true'], $options);
     $options = $this->getFieldOptions($options);
     $wrapperOptions = [];
     if ($this->getType() === Type::HORIZONTAL) {
         $wrapperOptions = ['class' => $this->getRightColumnClass()];
     }
     $inputElement = $this->form->input('file', $name, null, $options);
     $groupElement = '<div ' . $this->html->attributes($wrapperOptions) . '>' . $inputElement . $this->getFieldError($name) . '</div>';
     return $this->getFormGroupWithLabel($name, $label, $groupElement);
 }
开发者ID:jeylabs,项目名称:larastrap,代码行数:21,代码来源:BootstrapForm.php

示例4: 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

示例5: input

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

示例6: checkable

 /**
  * Create a checkable input field.
  *
  * @param  string $type
  * @param  string $name
  * @param  mixed  $value
  * @param  bool   $checked
  * @param  array  $options
  *
  * @return string
  */
 protected function checkable($type, $name, $value, $checked, $options)
 {
     $checked = $this->getCheckedState($type, $name, $value, $checked);
     if ($checked) {
         $options['checked'] = 'checked';
     }
     return parent::input($type, $name, $value, $options);
 }
开发者ID:drickferreira,项目名称:enhanced-bootstrap-forms,代码行数:19,代码来源:FormBuilder.php

示例7: input

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

示例8: input

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

示例9: inputSet

 public function inputSet($type, $name, $value = null, $options = [], $customInput = null)
 {
     $options = $this->converter->convert(Helper::getFormAttribute($name)) + $options;
     $labelText = isset($options['label']) ? $options['label'] : null;
     $requiredLabel = isset($options['data-rule-required']) ? self::$requiredLabel : '';
     $label = self::label($name, $labelText, [], $requiredLabel);
     $input = isset($customInput) ? $customInput : parent::input($type, $name, $value, $options);
     return self::makeSet($label, $input);
 }
开发者ID:PaulSpr,项目名称:laravalid,代码行数:9,代码来源:FormBuilder.php

示例10: color

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


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