本文整理汇总了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);
}
示例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);
}
示例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);
}
示例4: destroy2
public function destroy2($text, $message, $class = null)
{
return parent::submit($text, ['class' => 'btn btn-danger ' . ($class ? $class : ''), 'onclick' => 'return confirm(\'' . $message . '\')']);
}
示例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);
}
示例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);
}
示例7: registerFormSubmit
private function registerFormSubmit()
{
FormBuilder::macro('button_submit', function ($texte) {
return FormBuilder::submit($texte, ['class' => 'btn btn-info pull-right']);
});
}
示例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);
}