1 | <?php |
||
26 | class FacebookLikeBoxBlockService extends BaseFacebookSocialPluginsBlockService |
||
27 | { |
||
28 | /** |
||
29 | * {@inheritdoc} |
||
30 | */ |
||
31 | public function configureSettings(OptionsResolver $resolver) |
||
32 | { |
||
33 | $resolver->setDefaults(array( |
||
34 | 'template' => 'SonataSeoBundle:Block:block_facebook_like_box.html.twig', |
||
35 | 'url' => null, |
||
36 | 'width' => null, |
||
37 | 'height' => null, |
||
38 | 'colorscheme' => $this->colorschemeList['light'], |
||
39 | 'show_faces' => true, |
||
40 | 'show_header' => true, |
||
41 | 'show_posts' => false, |
||
42 | 'show_border' => true, |
||
43 | )); |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * {@inheritdoc} |
||
48 | */ |
||
49 | public function buildEditForm(FormMapper $formMapper, BlockInterface $block) |
||
50 | { |
||
51 | $formMapper->add('settings', 'sonata_type_immutable_array', array( |
||
52 | 'keys' => array( |
||
53 | array('url', 'url', array( |
||
54 | 'required' => false, |
||
55 | 'label' => 'form.label_url', |
||
56 | )), |
||
57 | array('width', 'integer', array( |
||
58 | 'required' => false, |
||
59 | 'label' => 'form.label_width', |
||
60 | )), |
||
61 | array('height', 'integer', array( |
||
62 | 'required' => false, |
||
63 | 'label' => 'form.label_height', |
||
64 | )), |
||
65 | array('colorscheme', 'choice', array( |
||
66 | 'required' => true, |
||
67 | 'choices' => $this->colorschemeList, |
||
68 | 'label' => 'form.label_colorscheme', |
||
69 | )), |
||
70 | array('show_faces', 'checkbox', array( |
||
71 | 'required' => false, |
||
72 | 'label' => 'form.label_show_faces', |
||
73 | )), |
||
74 | array('show_header', 'checkbox', array( |
||
75 | 'required' => false, |
||
76 | 'label' => 'form.label_show_header', |
||
77 | )), |
||
78 | array('show_posts', 'checkbox', array( |
||
79 | 'required' => false, |
||
80 | 'label' => 'form.label_show_posts', |
||
81 | )), |
||
82 | array('show_border', 'checkbox', array( |
||
83 | 'required' => false, |
||
84 | 'label' => 'form.label_show_border', |
||
85 | )), |
||
86 | ), |
||
87 | 'translation_domain' => 'SonataSeoBundle', |
||
88 | )); |
||
89 | } |
||
90 | |||
91 | /** |
||
92 | * {@inheritdoc} |
||
93 | */ |
||
94 | public function getBlockMetadata($code = null) |
||
100 | } |
||
101 |