BaseFacebookSocialPluginsBlockService::execute()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

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