本文整理汇总了PHP中Kris\LaravelFormBuilder\FormBuilder::plain方法的典型用法代码示例。如果您正苦于以下问题:PHP FormBuilder::plain方法的具体用法?PHP FormBuilder::plain怎么用?PHP FormBuilder::plain使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Kris\LaravelFormBuilder\FormBuilder
的用法示例。
在下文中一共展示了FormBuilder::plain方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
public function setUp()
{
parent::setUp();
$this->view = $this->app['view'];
$this->request = $this->app['request'];
$this->request->setSession($this->app['session.store']);
$this->validatorFactory = $this->app['validator'];
$this->model = Mockery::mock('Illuminate\\Database\\Eloquent\\Model');
$this->config = (include __DIR__ . '/../src/config/config.php');
$this->formHelper = new FormHelper($this->view, $this->request, $this->config);
$this->formBuilder = new FormBuilder($this->app, $this->formHelper);
$this->plainForm = $this->formBuilder->plain();
}
示例2: setUp
public function setUp()
{
parent::setUp();
$this->view = $this->app['view'];
$this->request = $this->app['request'];
$this->request->setSession($this->app['session.store']);
$this->validatorFactory = $this->app['validator'];
$this->model = new TestModel();
$this->config = (include __DIR__ . '/../src/config/config.php');
$this->formHelper = new FormHelper($this->view, $this->config);
$this->formBuilder = new FormBuilder($this->app, $this->formHelper);
$this->plainForm = $this->formBuilder->plain();
}
示例3: getSearchForm
/**
* Gets existing instance or create a new search input form.
*
* @param string $action Form action URL
* @return Form
*/
public static function getSearchForm($action = '')
{
$class = get_called_class();
if (empty(self::$searchForms[$class])) {
self::$searchForms[$class] = self::$formBuilder->plain(['class' => 'form-inline', 'method' => 'get', 'url' => $action])->add('query', 'text', ['label' => false, 'attr' => ['placeholder' => self::$translator->trans('lavanda::common.search_placeholder')]])->add('search', 'submit', ['label' => self::$translator->trans('lavanda::common.search_button')]);
}
return self::$searchForms[$class];
}
示例4: plain
/**
* Get instance of the empty form which can be modified
*
* @param array $options
* @param array $data
* @return \Form
* @static
*/
public static function plain($options = array(), $data = array())
{
return \Kris\LaravelFormBuilder\FormBuilder::plain($options, $data);
}