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