1 | <?php |
||
17 | abstract class GenericDisplayElement extends AbstractElement implements Element |
||
18 | { |
||
19 | /** |
||
20 | * {@inheritdoc} |
||
21 | */ |
||
22 | public function getRoute() |
||
26 | |||
27 | /** |
||
28 | * @param \Symfony\Component\OptionsResolver\OptionsResolver $resolver |
||
29 | * @return mixed |
||
30 | */ |
||
31 | public function configureOptions(OptionsResolver $resolver) |
||
32 | { |
||
33 | $resolver->setDefaults([ |
||
34 | 'template' => null, |
||
35 | ]); |
||
36 | |||
37 | $resolver->setAllowedTypes('template', ['null', 'string']); |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | */ |
||
43 | public function createDisplay($object) |
||
56 | |||
57 | /** |
||
58 | * @param mixed $object |
||
59 | * @return Display |
||
60 | */ |
||
61 | abstract protected function initDisplay($object); |
||
62 | } |
||
63 |