當前位置: 首頁>>代碼示例>>PHP>>正文


PHP FormBuilder::submit方法代碼示例

本文整理匯總了PHP中Collective\Html\FormBuilder::submit方法的典型用法代碼示例。如果您正苦於以下問題:PHP FormBuilder::submit方法的具體用法?PHP FormBuilder::submit怎麽用?PHP FormBuilder::submit使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Collective\Html\FormBuilder的用法示例。


在下文中一共展示了FormBuilder::submit方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: submit

 /**
  * Create a Boostrap submit button.
  *
  * @param  string $value
  * @param  array  $options
  *
  * @return string
  */
 public function submit($value = null, array $options = [])
 {
     $options = array_merge(['class' => 'btn btn-primary'], $options);
     $inputElement = $this->form->submit($value, $options);
     $wrapperOptions = $this->isHorizontal() ? ['class' => implode(' ', [$this->getLeftColumnOffsetClass(), $this->getRightColumnClass()])] : [];
     $wrapperElement = '<div' . $this->html->attributes($wrapperOptions) . '>' . $inputElement . '</div>';
     return $this->getFormGroup(null, $wrapperElement);
 }
開發者ID:bnbwebexpertise,項目名稱:laravel-bootstrap-form,代碼行數:16,代碼來源:BootstrapForm.php

示例2: submit

 /**
  * Create a Boostrap submit button.
  *
  * @param  string  $value
  * @param  array   $options
  * @return string
  */
 public function submit($value = null, array $options = [])
 {
     $options = array_merge(['class' => 'btn btn-primary'], $options);
     $wrapperOptions = [];
     if ($this->getType() === Type::HORIZONTAL) {
         $wrapperOptions = ['class' => $this->getLeftColumnOffsetClass() . ' ' . $this->getRightColumnClass()];
     }
     $inputElement = $this->form->submit($value, $options);
     $groupElement = '<div ' . $this->html->attributes($wrapperOptions) . '>' . $inputElement . '</div>';
     return $this->getFormGroup(null, $groupElement);
 }
開發者ID:jeylabs,項目名稱:larastrap,代碼行數:18,代碼來源:BootstrapForm.php

示例3: submit

 /**
  * Create a submit button element.
  *
  * @param string $value
  * @param array $options
  * @return string 
  * @static 
  */
 public static function submit($value = null, $options = array())
 {
     return \Collective\Html\FormBuilder::submit($value, $options);
 }
開發者ID:alvarobfdev,項目名稱:BaseCRUDproject,代碼行數:12,代碼來源:_ide_helper.php

示例4: destroy2

 public function destroy2($text, $message, $class = null)
 {
     return parent::submit($text, ['class' => 'btn btn-danger ' . ($class ? $class : ''), 'onclick' => 'return confirm(\'' . $message . '\')']);
 }
開發者ID:thaida,項目名稱:CMS,代碼行數:4,代碼來源:FormBuilder.php

示例5: submit

 public function submit($value = null, $options = [])
 {
     $options['class'] = 'btn btn-cons btn-awesome' . (isset($options['class']) ? ' ' . $options['class'] : '');
     return parent::submit($value, $options);
 }
開發者ID:wi-development,項目名稱:my-framework,代碼行數:5,代碼來源:FormBuilder.php

示例6: submit

 public function submit($value = null, $options = [])
 {
     $cancelUrl = array_key_exists('cancelUrl', $options) ? $options['cancelUrl'] : null;
     $cancelHtml = '';
     $options = $this->setOptionClasses('', $options, ['btn', 'btn-primary']);
     $controlOptions = $this->getControlOptions(collect($options));
     $controlHtml = parent::submit($value, $controlOptions->toArray());
     if (!is_null($cancelUrl)) {
         $cancelHtml = link_to($cancelUrl, 'Cancel', ['class' => 'btn btn-cancel pull-right']);
     }
     // TODO: render cancel and reset buttons.
     return $this->renderControl('submit', $controlHtml, '', '', $options);
 }
開發者ID:genealabs,項目名稱:laravel-casts,代碼行數:13,代碼來源:FormBuilder.php

示例7: registerFormSubmit

 private function registerFormSubmit()
 {
     FormBuilder::macro('button_submit', function ($texte) {
         return FormBuilder::submit($texte, ['class' => 'btn btn-info pull-right']);
     });
 }
開發者ID:WizzerOmega,項目名稱:webstock,代碼行數:6,代碼來源:HtmlFormServiceProvider.php

示例8: submit

 /**
  * {@inheritdoc}
  * @param string|null $value   The value of the submit button
  * @param array       $options The options
  * @return string
  */
 public function submit($value = null, $options = array())
 {
     $options['class'] = isset($options['class']) ? 'btn ' . Button::NORMAL . ' ' . $options['class'] : 'btn ' . Button::NORMAL;
     return parent::submit($value, $options);
 }
開發者ID:subfission,項目名稱:bootstrapper,代碼行數:11,代碼來源:Form.php


注:本文中的Collective\Html\FormBuilder::submit方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。