本文整理匯總了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);
}