本文整理匯總了PHP中Nette\Forms\Form::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Form::__construct方法的具體用法?PHP Form::__construct怎麽用?PHP Form::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Nette\Forms\Form
的用法示例。
在下文中一共展示了Form::__construct方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* Application form constructor.
*/
public function __construct(Nette\ComponentModel\IContainer $parent = NULL, $name = NULL)
{
parent::__construct();
if ($parent !== NULL) {
$parent->addComponent($this, $name);
}
}
示例2: __construct
/**
* Application form constructor.
*/
public function __construct(Nette\ComponentModel\IContainer $parent = NULL, $name = NULL)
{
parent::__construct();
$this->monitor('Nette\\Application\\UI\\Presenter');
if ($parent !== NULL) {
$parent->addComponent($this, $name);
}
}
示例3: __construct
/**
* @inheritDoc
*/
public function __construct($name)
{
parent::__construct($name);
$this->onValidate[] = [$this, 'validateRedirectUri'];
$this->setMethod('POST');
$this->addProtection('Security token has expired, please submit the form again');
$this->addText('name', 'Name of client:')->setMaxLength(255)->setRequired('Set a name');
$this->addTextArea('description', 'Description of client:', null, 5);
$this->addTextArea('redirect_uri', 'Static/enforcing callback-url (one per line)', null, 5)->setRequired('Write one redirect URI at least');
$this->addSubmit('submit', 'Submit');
$this->addButton('return', 'Return')->setAttribute('onClick', 'parent.location = \'' . Module::getModuleURL('oauth2/registry.php') . '\'');
}
示例4: __construct
/**
* @param IRequest|null
*/
public function __construct(IRequest $httpRequest = NULL)
{
parent::__construct();
$this->httpRequest = $httpRequest;
}