本文整理汇总了PHP中Illuminate\Html\FormBuilder::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP FormBuilder::__construct方法的具体用法?PHP FormBuilder::__construct怎么用?PHP FormBuilder::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Html\FormBuilder
的用法示例。
在下文中一共展示了FormBuilder::__construct方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* The constructor
*
* @param HtmlBuilder $html
* @param UrlGenerator $url
* @param Session $session
*/
public function __construct(HtmlBuilder $html, UrlGenerator $url, Session $session)
{
parent::__construct($html, $url, $session->getToken());
$this->session = $session;
$this->requiredFields = [];
$this->errorFields = [];
if ($this->session->has('formhelper-required-fields')) {
$this->requiredFields = $this->session->get('formhelper-required-fields');
$this->session->forget('formhelper-required-fields');
}
if ($this->session->has('formhelper-error-fields')) {
$this->errorFields = $this->session->get('formhelper-error-fields');
$this->session->forget('formhelper-error-fields');
}
}
示例2: __construct
/**
* Create a new form builder instance.
*
* @param \Illuminate\Html\HtmlBuilder $html
* @param \Illuminate\Routing\UrlGenerator $url
* @param string $csrfToken
* @param string $sessionKey
* @return void
*/
public function __construct(HtmlBuilder $html, UrlGeneratorBase $url, $csrfToken, $sessionKey)
{
$this->sessionKey = $sessionKey;
parent::__construct($html, $url, $csrfToken);
}
示例3: __construct
/**
* Create new instance of this FormBuilder intercepter!
*
* @param Illuminate\Routing\UrlGenerator $url
* @param Illuminate\Html\HtmlBuilder $html
* @param string $token
* @param Illuminate\Translation\Translator $translator
* @param mixed $errors
*
* @return void
*/
public function __construct($html, $url, $token, $translator, $errors = null)
{
$this->local_errors = $errors != null ? $errors : new MessageBag();
parent::__construct($html, $url, $token, $translator);
}
示例4: __construct
/**
* Create a new form builder instance.
*
* @param \Illuminate\Routing\UrlGenerator $url
* @param \Illuminate\Html\HtmlBuilder $html
* @param string $csrfToken
* @return void
*/
public function __construct(IlluminateHtmlBuilder $html, UrlGenerator $url, $csrfToken, ManagerInterface $manager)
{
parent::__construct($html, $url, $csrfToken);
$this->manager = $manager;
}
示例5: __construct
public function __construct(HtmlBuilder $html, UrlGenerator $url, $csrfToken)
{
parent::__construct($html, $url, $csrfToken);
$this->lang = app('translator');
}
示例6: __construct
public function __construct(\Illuminate\Html\HtmlBuilder $html, \Illuminate\Routing\UrlGenerator $url, $csrfToken)
{
parent::__construct($html, $url, $csrfToken);
}
示例7: __construct
public function __construct(\Illuminate\Html\HtmlBuilder $html, \Illuminate\Routing\UrlGenerator $url, $csrfToken, Converter\Base\Converter $converter)
{
parent::__construct($html, $url, $csrfToken);
$plugin = \Config::get('laravalid.plugin');
$this->converter = $converter;
}
示例8: __construct
/**
* Constructor
*
* @param Html $html
* @param UrlGenerator $url
* @param string $csrfToken
*/
public function __construct(Html $html, UrlGenerator $url, $csrfToken)
{
parent::__construct($html, $url, $csrfToken);
}