| 1 | <?php |
||
| 10 | class YamlType extends AbstractType |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * {@inheritdoc} |
||
| 14 | */ |
||
| 15 | public function buildForm(FormBuilderInterface $builder, array $options) |
||
| 16 | { |
||
| 17 | $builder |
||
| 18 | ->addModelTransformer(new YamlTransformer($options['inline_level'])) |
||
| 19 | ; |
||
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * {@inheritdoc} |
||
| 24 | */ |
||
| 25 | public function setDefaultOptions(OptionsResolverInterface $resolver) |
||
| 26 | { |
||
| 27 | parent::setDefaultOptions($resolver); |
||
| 28 | |||
| 29 | $resolver->setDefaults(array( |
||
| 30 | 'inline_level' => 10, |
||
| 31 | )); |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * {@inheritdoc} |
||
| 36 | */ |
||
| 37 | public function getParent() |
||
| 41 | |||
| 42 | /** |
||
| 43 | * {@inheritdoc} |
||
| 44 | */ |
||
| 45 | public function getName() |
||
| 49 | } |
||
| 50 |