本文整理汇总了PHP中Venne\Forms\Form::addHidden方法的典型用法代码示例。如果您正苦于以下问题:PHP Form::addHidden方法的具体用法?PHP Form::addHidden怎么用?PHP Form::addHidden使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Venne\Forms\Form
的用法示例。
在下文中一共展示了Form::addHidden方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: configure
/**
* @param Form $form
*/
public function configure(Form $form)
{
$form->addHidden('provider')->setValue($this->provider);
$form['parameters'] = $this->securityManager->getLoginProviderByName($this->provider)->getFormContainer();
$form->addSaveButton('Sign in')->getControlPrototype()->class[] = 'btn-primary';
$form->addSubmit('cancel', 'Cancel')->setValidationScope(FALSE);
}
示例2: configure
/**
* @param Form $form
*/
public function configure(Form $form)
{
$types = array();
foreach ($form->data->types as $entity) {
$types[$entity->id] = (string) $entity;
}
$c = count($types);
if ($c === 0) {
$typeControl = $form->addHidden('type')->setDefaultValue(NULL);
} elseif ($c === 1) {
$typeControl = $form->addHidden('type')->setDefaultValue(key($types));
$typeControl->addRule($form::FILLED);
} else {
$typeControl = $form->addSelect('type', 'Type', $types);
$typeControl->addRule($form::FILLED);
}
$form->addText('sum', 'Sum')->addRule($form::FILLED)->addRule($form::INTEGER)->setDefaultValue(1);
$form->addSubmit('order', 'Order');
}
示例3: configure
public function configure(Form $form)
{
$form->addHidden('sort');
$form->addSaveButton('Store layout');
}