本文整理汇总了PHP中Anomaly\Streams\Platform\Ui\Form\FormBuilder::getFormFields方法的典型用法代码示例。如果您正苦于以下问题:PHP FormBuilder::getFormFields方法的具体用法?PHP FormBuilder::getFormFields怎么用?PHP FormBuilder::getFormFields使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Anomaly\Streams\Platform\Ui\Form\FormBuilder
的用法示例。
在下文中一共展示了FormBuilder::getFormFields方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: handle
/**
* Handle the event.
*
* @param Store $session
*/
public function handle(Store $session)
{
/* @var FieldType $field */
foreach ($this->builder->getFormFields() as $field) {
$session->flash($field->getFieldName(), $field->getPostValue());
}
}
示例2: handle
/**
* Handle the event.
*/
public function handle()
{
/* @var FieldType $field */
foreach ($this->builder->getFormFields() as $field) {
$field->setValue($field->getPostValue());
}
}
示例3: handle
/**
* Handle the command.
*
* @param Decorator $decorator
* @param Parser $parser
* @return array
*/
public function handle(Decorator $decorator, Parser $parser)
{
$data = [];
$data['form'] = $this->builder->getFormPresenter();
$data['fields'] = $decorator->decorate($this->builder->getFormFields());
$data['subject'] = $parser->parse($this->builder->getOption('subject', 'Contact Request'), $this->builder->getFormValues()->all());
return $data;
}
示例4: save
/**
* Save the form.
*
* @param FormBuilder|ConfigurationFormBuilder $builder
* @return bool|mixed
*/
public function save(FormBuilder $builder)
{
$namespace = $builder->getFormEntry() . '::';
/* @var FieldType $field */
foreach ($builder->getFormFields() as $field) {
$this->configurations->set($namespace . $field->getField(), $builder->getScope(), $builder->getFormValue($field->getInputName()));
}
}
示例5: extend
/**
* Extend the validation factory.
*
* @param Factory $factory
* @param FormBuilder $builder
*/
public function extend(Factory $factory, FormBuilder $builder)
{
foreach ($builder->getFormFields() as $fieldType) {
$this->registerValidators($factory, $builder, $fieldType);
}
}