Completed
Push — 2.x-dev-kit ( 971030 )
by
unknown
07:52
created

BaseFacebookSocialPluginsBlockService   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 5
Bugs 1 Features 0
Metric Value
wmc 1
c 5
b 1
f 0
lcom 0
cbo 2
dl 0
loc 23
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A execute() 0 9 1
1
<?php
2
3
/*
4
 * This file is part of the Sonata Project package.
5
 *
6
 * (c) Thomas Rabaix <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Sonata\SeoBundle\Block\Social;
13
14
use Sonata\BlockBundle\Block\BaseBlockService;
15
use Sonata\BlockBundle\Block\BlockContextInterface;
16
use Symfony\Component\HttpFoundation\Response;
17
18
/**
19
 * Abstract class for Facebook Social Plugins blocks services.
20
 *
21
 * @author Sylvain Deloux <[email protected]>
22
 */
23
abstract class BaseFacebookSocialPluginsBlockService extends BaseBlockService
24
{
25
    /**
26
     * @var string[]
27
     */
28
    protected $colorschemeList = array(
29
        'light' => 'form.label_colorscheme_light',
30
        'dark' => 'form.label_colorscheme_dark',
31
    );
32
33
    /**
34
     * {@inheritdoc}
35
     */
36
    public function execute(BlockContextInterface $blockContext, Response $response = null)
37
    {
38
        $settings = $blockContext->getSettings();
39
40
        return $this->renderResponse($blockContext->getTemplate(), array(
41
            'block' => $blockContext->getBlock(),
42
            'settings' => $settings,
43
        ), $response);
44
    }
45
}
46