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


PHP FormBuilder::label方法代码示例

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


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

示例1: textfield

 public function textfield($name, $label, $errors, $labelOptions = array(), $inputOptions = array())
 {
     $labelOptions['class'] = 'form-label';
     $inputOptions['class'] = 'form-control';
     $inputOptions['placeholder'] = $label;
     return sprintf('<div class="form-group">%s<div%s>%s%s</div></div><!-- end form-group -->', parent::label($name, $label, $labelOptions), $errors->has($name) ? ' class="error-control"' : '', parent::text($name, null, $inputOptions), $errors->has($name) ? '<span class="error"><label class="error" for="' . $name . '">' . $errors->first($name) . '</label></span>' : '');
 }
开发者ID:hungkhanh0709,项目名称:PhuongLoiFashion,代码行数:7,代码来源:FormBuilder.php

示例2: getFormGroupPassword

 public function getFormGroupPassword($label, $id, $value, $errors)
 {
     $feedBackSelector = $this->getFeedBackSelector($errors, $id);
     $feedBackHtml = $this->getFeedBackHtml($errors, $id);
     $retval = "<div class=\"form-group  " . $feedBackSelector . "\">\n                " . parent::label('' . $id . '', '' . $label . ':', ['class' => 'control-label']) . "\n                " . parent::password('' . $id . '', ['class' => 'form-control']) . "\n                " . $feedBackHtml . "\n            </div>";
     return $retval;
 }
开发者ID:wi-development,项目名称:my-framework,代码行数:7,代码来源:FormBuilder.php

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

示例4: 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:gitter-badger,项目名称:scaffolder-theme-material,代码行数:8,代码来源:MaterialThemeForm.php

示例5: wrapField

 protected function wrapField($field, $labelName, $fieldOptions)
 {
     $labelText = isset($fieldOptions['label']) ? $fieldOptions['label'] : null;
     //making sure that we match field's ID even when it is custom
     $labelName = isset($field['id']) ? $fieldOptions['id'] : $labelName;
     return sprintf('
     <div class="input-field col l3 m4 s8 offset-l2 offset-m1 offset-s2">
         %s
         %s
     </div>', $field, parent::label($labelName, $labelText, []));
 }
开发者ID:IQ-RIA,项目名称:scaffolder-theme-material,代码行数:11,代码来源:MaterialThemeForm.php

示例6: registerFormTextField

 private function registerFormTextField()
 {
     FormBuilder::macro('textField', function ($type, $name, $errors, $label, $labelOptions = array(), $inputOptions = array(), $inputClass) {
         $valeur = \Request::old($name) ? \Request::old($name) : null;
         $inputOptions['class'] = 'form-control';
         return sprintf('
             <div class="form-group">
                 %s
                 <div class="' . $inputClass . '">
                     %s
                 </div>
             </div>', FormBuilder::label($name, $label, $labelOptions), $type == 'email' ? FormBuilder::email($name, $valeur, $inputOptions) : FormBuilder::text($name, $valeur, $inputOptions), $errors->first($name, '<small class="help-block">:message</small>'));
     });
 }
开发者ID:WizzerOmega,项目名称:webstock,代码行数:14,代码来源:HtmlFormServiceProvider.php

示例7: label

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

示例8: label

 /**
  * Create a Bootstrap label.
  *
  * @param  string $name
  * @param  string $value
  * @param  array  $options
  *
  * @return string
  */
 public function label($name, $value = null, array $options = [])
 {
     $options = $this->getLabelOptions($options);
     return $this->form->label($name, $value, $options);
 }
开发者ID:bnbwebexpertise,项目名称:laravel-bootstrap-form,代码行数:14,代码来源:BootstrapForm.php

示例9: label

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

示例10: label

 /**
  * Create a form label element.
  *
  * @param string $name
  * @param string $value
  * @param array  $options
  * @param bool   $escape_html
  *
  * @return \Illuminate\Support\HtmlString
  * @static
  */
 public static function label($name, $value = null, $options = array(), $escape_html = true)
 {
     return \Collective\Html\FormBuilder::label($name, $value, $options, $escape_html);
 }
开发者ID:Dimimo,项目名称:Booklet,代码行数:15,代码来源:_ide_helper.php

示例11: label

 public function label($name, $label = null, $options = [], $escapeHtml = true)
 {
     $label = array_pull($options, 'label') ?? $label ?? '';
     $options = $this->setLabelOptionClasses($options);
     return parent::label($name, $label, $options, $escapeHtml);
 }
开发者ID:genealabs,项目名称:laravel-casts,代码行数:6,代码来源:FormBuilder.php

示例12: label

 /**
  * {@inheritdoc}
  * @param string      $name    The name of the object this label will be
  *                             attached to
  * @param string|null $value   The text of the label
  * @param array       $options The options of the label
  * @return string
  */
 public function label($name, $value = null, $options = array(), $valueHtml = false)
 {
     $options['class'] = isset($options['class']) ? self::LABEL . ' ' . $options['class'] : self::LABEL;
     return parent::label($name, $value, $options, $valueHtml);
 }
开发者ID:JaapMoolenaar,项目名称:bootstrapper,代码行数:13,代码来源:Form.php

示例13: label

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


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