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


PHP FormBuilder::open方法代码示例

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


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

示例1: formOpen

 /**
  * @param Form $form
  * @return mixed
  */
 public function formOpen(Form $form)
 {
     $options = $form->getAttributes();
     $options['files'] = $form->files;
     if ($action = $form->action) {
         $options[$form->actionType] = $action;
     }
     if ($model = $form->model) {
         $html = $this->builder->model($model, $options);
         $form->fill(array_dot($model->toArray()));
     } else {
         $html = $this->builder->open($options);
     }
     return $html;
 }
开发者ID:iyoworks,项目名称:form-builder,代码行数:19,代码来源:LaravelFormRenderer.php

示例2: open

 /**
  * @param array $options
  * @return string
  */
 public function open(array $options = [])
 {
     $this->errors = array_get($options, 'errors');
     array_forget($options, 'errors');
     array_set($options, 'files', true);
     return parent::open($options);
 }
开发者ID:stevenklar,项目名称:admin,代码行数:11,代码来源:FormBuilder.php

示例3: open

 /**
  * Open a form while passing a model and the routes for storing or updating 
  * the model. This will set the correct route along with the correct 
  * method.
  *
  * @param  array  $options
  * @return string
  */
 public function open(array $options = array())
 {
     $options = $this->parseModelBinding($options);
     // Set the HTML5 role.
     $options['role'] = 'form';
     // If the class hasn't been set, set the default style.
     if (!isset($options['class'])) {
         $defaultForm = $this->getDefaultForm();
         if ($defaultForm === 'horizontal') {
             $options['class'] = 'form-horizontal';
         } else {
             if ($defaultForm === 'inline') {
                 $options['class'] = 'form-inline';
             }
         }
     }
     return $this->form->open($options);
 }
开发者ID:Javier-Rotelli,项目名称:bootstrap-form,代码行数:26,代码来源:BootstrapForm.php

示例4: open

 public function open(array $options = array())
 {
     if (!array_key_exists('autocomplete', $options)) {
         $options['autocomplete'] = 'off';
     }
     if (empty($options['role'])) {
         $options['role'] = 'form';
     }
     return parent::open($options);
 }
开发者ID:rtconner,项目名称:laravel-plusplus,代码行数:10,代码来源:BootstrapFormBuilder.php

示例5: open

 /**
  * Opens form, set rules
  *
  * @param array $rules 		Laravel validation rules
  *
  * @see Illuminate\Html\FormBuilder
  */
 public function open(array $options = array(), $rules = null)
 {
     $this->setValidation($rules);
     if (isset($options['name'])) {
         $this->converter->setFormName($options['name']);
     } else {
         $this->converter->setFormName(null);
     }
     return parent::open($options);
 }
开发者ID:jitheshgopan,项目名称:laravalid,代码行数:17,代码来源:FormBuilder.php

示例6: open

 /**
  * Open up a new HTML form.
  * Form model uses this so we dont have to check again
  *
  * @param  array   $options
  * @return string
  */
 public function open(array $options = array())
 {
     // Check if the user has access if not dont show the element
     if (!$this->checkRoleAccess($options)) {
         $this->access = false;
         return;
     } else {
         $this->access = true;
     }
     return parent::open($options);
 }
开发者ID:leitom,项目名称:role,代码行数:18,代码来源:FormBuilder.php

示例7: open

 /**
  * Open up a new HTML form and includes a session key.
  * @param array $options
  * @return string
  */
 public function open(array $options = [])
 {
     $method = strtoupper(array_get($options, 'method', 'post'));
     $request = array_get($options, 'request');
     $model = array_get($options, 'model');
     if ($model) {
         $this->model = $model;
     }
     $append = $this->requestHandler($request);
     if ($method != 'GET') {
         $append .= $this->sessionKey(array_get($options, 'sessionKey'));
     }
     return parent::open($options) . $append;
 }
开发者ID:mechiko,项目名称:staff-october,代码行数:19,代码来源:FormBuilder.php

示例8: open

 /**
  * Open the form, and add the fields for an specific action or the default fields if no action is defined.
  *
  * @param  string|null $action
  * @param  array       $attributes
  *
  * @return string
  */
 public function open($action = null, array $attributes = array())
 {
     if (is_array($action)) {
         $attributes = $action;
         $action = null;
     }
     $form = $this->formFor($action);
     $attributes = array_merge($attributes, ['method' => $this->method, 'url' => $this->action, 'files' => $this->hasFile()]);
     if ($this->model) {
         return $this->builder->model($this->model, $attributes);
     } else {
         return $this->builder->open($attributes);
     }
 }
开发者ID:ruysu,项目名称:laravel4-form,代码行数:22,代码来源:FormBuilder.php

示例9: open

 /**
  * Open up a new HTML form.
  *
  * @param  array   $options
  * @return string
  */
 public function open(array $options = array())
 {
     if (isset($options['errors'])) {
         if (is_array($options['errors'])) {
             $this->setErrors($options['errors'][0]);
             if (isset($options['errors'][1])) {
                 $this->errorCssClass = $options['errors'][1];
             }
         } else {
             $this->setErrors($options['errors']);
         }
         unset($options['errors']);
     }
     return parent::open($options);
 }
开发者ID:wingsline,项目名称:inuitcss,代码行数:21,代码来源:FormBuilder.php

示例10: open

 /**
  * Overrides the base form open method to allow for automatic insertion of csrf tokens
  * and form class
  *
  * @param  array  $attributes
  * @return string
  */
 public function open(array $attributes = array())
 {
     // Add in the form class if necessary
     if (empty($attributes['class'])) {
         $attributes['class'] = $this->getOption('formClass');
     } elseif (strpos($attributes['class'], 'form-') === false) {
         $attributes['class'] .= ' ' . $this->getOption('formClass');
     }
     return parent::open($attributes);
 }
开发者ID:jarnstedt,项目名称:former,代码行数:17,代码来源:Former.php

示例11: busqueda

 public function busqueda($params)
 {
     $this->buscando = true;
     return parent::open($params);
 }
开发者ID:richarrieta,项目名称:miequipo,代码行数:5,代码来源:FormMacros.php

示例12: open

 public function open(array $options = array())
 {
     $default = ['files' => true];
     $options = array_merge($default, $options);
     return parent::open($options);
 }
开发者ID:OmarMakled,项目名称:Html,代码行数:6,代码来源:FormBuilder.php

示例13: open

 /**
  * Open a form while passing a model and the routes for storing or updating
  * the model. This will set the correct route along with the correct
  * method.
  *
  * @param  array $options
  * @return string
  */
 public function open(array $options = [])
 {
     $this->translationDomain = array_get($options, 'translationDomain', '');
     unset($options['translationDomain']);
     return $this->form->open($options);
 }
开发者ID:Junyue,项目名称:zidisha2,代码行数:14,代码来源:BootstrapFormBuilder.php

示例14: open

 /**
  * Open up a new HTML form.
  *
  * @param  array   $options
  * @return \Illuminate\Support\HtmlString
  */
 public function open(array $options = [])
 {
     return new HtmlString(parent::open($options));
 }
开发者ID:minors,项目名称:html,代码行数:10,代码来源:FormBuilder.php

示例15: open

 /**
  * Opens form, set rules
  *
  * @param array $rules 		Laravel validation rules
  *
  * @see Illuminate\Html\FormBuilder
  */
 public function open(array $options = array(), $rules = null)
 {
     $this->setValidation($rules);
     return parent::open($options);
 }
开发者ID:bllim,项目名称:laravel-to-jquery-validation,代码行数:12,代码来源:FormBuilder.php


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