1 | <?php |
||
36 | class HelpTypeExtension extends AbstractTypeExtension |
||
37 | { |
||
38 | |||
39 | /** |
||
40 | * {@inheritdoc} |
||
41 | */ |
||
42 | public function buildForm(FormBuilderInterface $builder, array $options) |
||
43 | { |
||
44 | $builder->setAttribute('help', $options['help']); |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | public function buildView(FormView $view, FormInterface $form, array $options) |
||
51 | { |
||
52 | $view->vars['help'] = $form->getConfig()->getAttribute('help'); |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * {@inheritdoc} |
||
57 | */ |
||
58 | public function setDefaultOptions(OptionsResolverInterface $resolver) |
||
59 | { |
||
60 | $resolver->setDefaults(array( |
||
61 | 'help' => null, |
||
62 | )); |
||
63 | } |
||
64 | |||
65 | 323 | public function getExtendedType() |
|
69 | } |
||
70 |