本文整理汇总了PHP中Venne\Forms\Form::addDateTime方法的典型用法代码示例。如果您正苦于以下问题:PHP Form::addDateTime方法的具体用法?PHP Form::addDateTime怎么用?PHP Form::addDateTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Venne\Forms\Form
的用法示例。
在下文中一共展示了Form::addDateTime方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: configure
/**
* @param Form $form
*/
public function configure(Form $form)
{
$form->addGroup();
$form->addText('name', 'Name');
$form->addText('localUrl', 'URL');
$form->addText('title', 'Title');
$form->addText('keywords', 'Keywords');
$form->addText('description', 'Description');
$form->addManyToOne('author', 'Author');
$form->addSelect('robots', 'Robots')->setItems(RouteEntity::getRobotsValues(), FALSE);
$form->addSelect('changefreq', 'Change frequency')->setItems(RouteEntity::getChangefreqValues(), FALSE)->setPrompt('-------');
$form->addSelect('priority', 'Priority')->setItems(RouteEntity::getPriorityValues(), FALSE)->setPrompt('-------');
// layout
$form->setCurrentGroup($form->addGroup());
$form->addCheckbox('copyLayoutFromParent', 'Layout from parent');
$form['copyLayoutFromParent']->addCondition($form::EQUAL, FALSE)->toggle('group-layout_' . $form->data->id);
$form->setCurrentGroup($form->getForm()->addGroup()->setOption('id', 'group-layout_' . $form->data->id));
$form->addManyToOne('layout', 'Layout');
$form->setCurrentGroup($form->addGroup());
$form->addCheckbox('copyLayoutToChildren', 'Share layout with children');
$form['copyLayoutToChildren']->addCondition($form::EQUAL, FALSE)->toggle('group-layout2_' . $form->data->id);
$form->setCurrentGroup($form->getForm()->addGroup()->setOption('id', 'group-layout2_' . $form->data->id));
$form->addManyToOne('childrenLayout', 'Share new layout');
// cache
$form->setCurrentGroup($form->addGroup());
$form->addCheckbox('copyCacheModeFromParent', 'Cache mode from parent');
$form['copyCacheModeFromParent']->addCondition($form::EQUAL, FALSE)->toggle('group-cache_' . $form->data->id);
$form->setCurrentGroup($form->getForm()->addGroup()->setOption('id', 'group-cache_' . $form->data->id));
$form->addSelect('cacheMode', 'Cache strategy')->setItems(\CmsModule\Content\Entities\RouteEntity::getCacheModes(), FALSE)->setPrompt('off');
$form->setCurrentGroup($form->addGroup());
$form->addFileEntityInput('photo', 'Photo');
$form->addTextArea('notation', 'Notation');
$form->addTextArea('text', 'Text');
$form->addGroup('Dates');
$form->addDateTime('created', 'Created')->setDisabled(TRUE);
$form->addDateTime('updated', 'Updated')->setDisabled(TRUE);
$form->addDateTime('released', 'Released')->addRule($form::FILLED);
$form->addDateTime('expired', 'Expired');
$form->addGroup('Tags');
$form->addContentTags('tags');
$aliases = $form->addMany('aliases', function (\Venne\Forms\Container $container) use($form) {
$container->setCurrentGroup($form->addGroup('URL alias'));
$container->addText('aliasUrl', 'Url')->setRequired();
$container->addText('aliasLang', 'Language alias');
$container->addText('aliasDomain', 'Domain url');
$container->addSubmit('remove', 'Remove alias')->addRemoveOnClick();
});
$aliases->addSubmit('add', 'Add alias')->addCreateOnClick();
$form->setCurrentGroup();
$form->addSaveButton('Save');
}
示例2: configure
/**
* @param Form $form
*/
public function configure(Form $form)
{
$route = $form->addOne('route');
$group = $form->addGroup();
$form->addText('name', 'Name');
$route->setCurrentGroup($group);
$route->addFileEntityInput('photo', 'Photo');
$route->addManyToOne('author', 'Author')->setDisabled(TRUE);
$route->addDateTime('released', 'Release date')->addRule($form::FILLED);
$route->addDateTime('expired', 'Expiry date');
$route->addTextArea('notation', 'Notation');
$form->addGroup('Event settings');
$form->addDateTime('date', 'Date')->addRule($form::FILLED);
$route->setCurrentGroup($form->addGroup('Content'));
$route->addContentEditor('text', NULL, NULL, 20);
$form->addSaveButton('Save');
}
示例3: configure
/**
* @param Form $form
*/
public function configure(Form $form)
{
$form->addManyToOne('account', 'Account');
$form->addManyToOne('offset', 'Offset');
$form->addText('paymentId', 'Payment ID');
$form->addDateTime('date', 'Date');
$form->addText('amount', 'Amount');
$form->addText('constantSymbol', 'Constant sb.');
$form->addText('variableSymbol', 'Variable sb.');
$form->addText('specificSymbol', 'Specific sb.');
$form->addText('userIdentification', 'User identific.');
$form->addTextArea('message', 'Message')->addRule($form::MAX_LENGTH, NULL, 140);
$form->addText('type', 'Type');
$form->addText('performed', 'Performed')->addRule($form::MAX_LENGTH, NULL, 50);
$form->addText('specification', 'Specification');
$form->addText('comment', 'Comment');
$form->addText('bic', 'BIC');
$form->addText('instructionId', 'Instruction ID');
$form->addSaveButton('Save');
}
示例4: configure
/**
* @param Form $form
*/
public function configure(Form $form)
{
$codes = $this->getCodes();
$form->addGroup();
$form->addManyToOne('person', 'Person');
$c = $form->addManyToOne('bank', 'Bank')->addRule($form::FILLED);
foreach ($codes as $id => $code) {
$c->addCondition($form::EQUAL, $id)->toggle('form-' . $code);
}
$form->addDateTime('syncDate', 'Last sync. date')->addRule($form::FILLED);
$form->addText('name', 'Account number')->addRule($form::FILLED);
$form->addManyToOne('currency', 'Currency')->addRule($form::FILLED);
$form->addText('iban', 'IBAN');
$form->addText('bic', 'BIC');
$drivers = $form->addContainer('drivers');
foreach ($this->paymentManager->getDrivers() as $driver) {
$container = $drivers->addContainer($driver->getCode());
$container->setCurrentGroup($form->addGroup($driver->getName())->setOption('id', 'form-' . $driver->getCode()));
$driver->configureOptionsContainer($container);
}
$form->addGroup();
$form->addSaveButton('Save');
}