1 | <?php |
||
26 | final class PiwikTrackerBlockService extends AbstractAdminBlockService |
||
27 | { |
||
28 | /** |
||
29 | * {@inheritdoc} |
||
30 | */ |
||
31 | public function execute(BlockContextInterface $blockContext, Response $response = null) |
||
32 | { |
||
33 | return $this->renderResponse($blockContext->getTemplate(), [ |
||
34 | 'context' => $blockContext, |
||
35 | 'settings' => $blockContext->getSettings(), |
||
36 | 'block' => $blockContext->getBlock(), |
||
37 | ], $response); |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | */ |
||
43 | public function buildEditForm(FormMapper $formMapper, BlockInterface $block): void |
||
44 | { |
||
45 | $formMapper->add('settings', ImmutableArrayType::class, [ |
||
46 | 'keys' => [ |
||
47 | ['host', TextType::class, [ |
||
48 | 'required' => false, |
||
49 | 'label' => 'form.label_host', |
||
50 | ]], |
||
51 | ['site', NumberType::class, [ |
||
52 | 'label' => 'form.label_site', |
||
53 | ]], |
||
54 | ['domaintitle', CheckboxType::class, [ |
||
55 | 'label' => 'form.label_domaintitle', |
||
56 | 'required' => false, |
||
57 | ]], |
||
58 | ['nocookies', CheckboxType::class, [ |
||
59 | 'label' => 'form.label_nocookies', |
||
60 | 'required' => false, |
||
61 | ]], |
||
62 | ['donottrack', CheckboxType::class, [ |
||
63 | 'label' => 'form.label_donottrack', |
||
64 | 'required' => false, |
||
65 | ]], |
||
66 | ], |
||
67 | 'translation_domain' => 'Core23PiwikBundle', |
||
68 | ]); |
||
69 | } |
||
70 | |||
71 | /** |
||
72 | * {@inheritdoc} |
||
73 | */ |
||
74 | public function configureSettings(OptionsResolver $resolver): void |
||
87 | |||
88 | /** |
||
89 | * {@inheritdoc} |
||
90 | */ |
||
91 | public function getBlockMetadata($code = null) |
||
97 | } |
||
98 |