FormDhtmlTextArea   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
eloc 9
dl 0
loc 33
rs 10
c 3
b 0
f 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 2
A render() 0 3 1
1
<?php
2
/**
3
 * XOOPS dhtmltextarea class
4
 *
5
 * You may not change or alter any portion of this comment or credits
6
 * of supporting developers from this source code or any supporting source code
7
 * which is considered copyrighted (c) material of the original comment or credit authors.
8
 * This program is distributed in the hope that it will be useful,
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11
 *
12
 * @copyright       (c) 2000-2016 XOOPS Project (www.xoops.org)
13
 * @license             GNU GPL 2 (https://www.gnu.org/licenses/gpl-2.0.html)
14
 * @package             class
15
 * @subpackage          editor
16
 * @since               2.3.0
17
 * @author              Taiwen Jiang <[email protected]>
18
 */
19
defined('XOOPS_ROOT_PATH') || exit('Restricted access');
20
21
xoops_load('XoopsEditor');
22
23
/**
24
 * FormDhtmlTextArea
25
 *
26
 * @package
27
 * @author              John
28
 * @copyright       (c) 2000-2016 XOOPS Project (www.xoops.org)
29
 * @access              public
30
 */
31
class FormDhtmlTextArea extends XoopsEditor
32
{
33
    /**
34
     * Hidden text
35
     *
36
     * @var string
37
     * @access private
38
     */
39
    public $_hiddenText = 'xoopsHiddenText';
40
    public $renderer;
41
42
    /**
43
     * FormDhtmlTextArea::__construct()
44
     *
45
     * @param array $options
46
     */
47
    public function __construct($options = array())
48
    {
49
        parent::__construct($options);
50
        $this->rootPath = '/class/xoopseditor/' . basename(__DIR__);
51
        $hiddenText     = isset($this->configs['hiddenText']) ? $this->configs['hiddenText'] : $this->_hiddenText;
52
        xoops_load('XoopsFormDhtmlTextArea');
53
        $this->renderer = new XoopsFormDhtmlTextArea('', $this->getName(), $this->getValue(), $this->getRows(), $this->getCols(), $hiddenText, $this->configs);
54
    }
55
56
    /**
57
     * FormDhtmlTextArea::render()
58
     *
59
     * @return string
60
     */
61
    public function render()
62
    {
63
        return $this->renderer->render();
64
    }
65
}
66