CKEditorHelper   A
last analyzed

Complexity

Total Complexity 9

Size/Duplication

Total Lines 79
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 9
c 0
b 0
f 0
lcom 1
cbo 2
dl 0
loc 79
ccs 19
cts 19
cp 1
rs 10

9 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A renderBasePath() 0 4 1
A renderJsPath() 0 4 1
A renderWidget() 0 4 1
A renderDestroy() 0 4 1
A renderPlugin() 0 4 1
A renderStylesSet() 0 4 1
A renderTemplate() 0 4 1
A getName() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the Ivory CKEditor package.
5
 *
6
 * (c) Eric GELOEN <[email protected]>
7
 *
8
 * For the full copyright and license information, please read the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Ivory\CKEditorBundle\Templating;
13
14
use Ivory\CKEditorBundle\Renderer\CKEditorRendererInterface;
15
use Symfony\Component\Templating\Helper\Helper;
16
17
/**
18
 * @author GeLo <[email protected]>
19
 * @author Adam Misiorny <[email protected]>
20
 */
21
class CKEditorHelper extends Helper implements CKEditorRendererInterface
22
{
23
    /**
24
     * @var CKEditorRendererInterface
25
     */
26
    private $renderer;
27
28
    /**
29
     * @param CKEditorRendererInterface $renderer
30
     */
31 70
    public function __construct(CKEditorRendererInterface $renderer)
32
    {
33 70
        $this->renderer = $renderer;
34 70
    }
35
36
    /**
37
     * {@inheritdoc}
38
     */
39 40
    public function renderBasePath($basePath)
40
    {
41 40
        return $this->renderer->renderBasePath($basePath);
42
    }
43
44
    /**
45
     * {@inheritdoc}
46
     */
47 40
    public function renderJsPath($jsPath)
48
    {
49 40
        return $this->renderer->renderJsPath($jsPath);
50
    }
51
52
    /**
53
     * {@inheritdoc}
54
     */
55 50
    public function renderWidget($id, array $config, array $options = [])
56
    {
57 50
        return $this->renderer->renderWidget($id, $config, $options);
58
    }
59
60
    /**
61
     * {@inheritdoc}
62
     */
63 50
    public function renderDestroy($id)
64
    {
65 50
        return $this->renderer->renderDestroy($id);
66
    }
67
68
    /**
69
     * {@inheritdoc}
70
     */
71 10
    public function renderPlugin($name, array $plugin)
72
    {
73 10
        return $this->renderer->renderPlugin($name, $plugin);
74
    }
75
76
    /**
77
     * {@inheritdoc}
78
     */
79 10
    public function renderStylesSet($name, array $stylesSet)
80
    {
81 10
        return $this->renderer->renderStylesSet($name, $stylesSet);
82
    }
83
84
    /**
85
     * {@inheritdoc}
86
     */
87 10
    public function renderTemplate($name, array $template)
88
    {
89 10
        return $this->renderer->renderTemplate($name, $template);
90
    }
91
92
    /**
93
     * {@inheritdoc}
94
     */
95 70
    public function getName()
96
    {
97 70
        return 'ivory_ckeditor';
98
    }
99
}
100