Completed
Push — master ( bf375b...cc5661 )
by Rafał
07:07
created

HtmlWidgetHandler   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 19
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A render() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of the Superdesk Web Publisher Templates System.
5
 *
6
 * Copyright 2015 Sourcefabric z.ú. and contributors.
7
 *
8
 * For the full copyright and license information, please see the
9
 * AUTHORS and LICENSE files distributed with this source code.
10
 *
11
 * @copyright 2015 Sourcefabric z.ú
12
 * @license http://www.superdesk.org/license
13
 */
14
15
namespace SWP\Component\TemplatesSystem\Gimme\Widget;
16
17
/**
18
 * Widgets idea
19
 * * Every widget have it's own clas with widget implementation
20
 * * Every widget have his own parameters.
21
 */
22
class HtmlWidgetHandler extends AbstractWidgetHandler
23
{
24
    protected static $expectedParameters = [
25
        'html_body' => [
26
            'type' => 'string',
27
            'default' => '',
28
        ],
29
    ];
30
31
    /**
32
     * Render widget content.
33
     *
34
     * @return string
35
     */
36
    public function render()
37
    {
38
        return $this->getModelParameter('html_body');
39
    }
40
}
41