Completed
Push — master ( 0d8a7c...91d2ee )
by Cheren
07:16
created

HtmlHelper   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A initialize() 0 12 1
1
<?php
2
/**
3
 * CakeCMS Backend
4
 *
5
 * This file is part of the of the simple cms based on CakePHP 3.
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 *
9
 * @package   Backend
10
 * @license   MIT
11
 * @copyright MIT License http://www.opensource.org/licenses/mit-license.php
12
 * @link      https://github.com/CakeCMS/Backend".
13
 * @author    Sergey Kalistratov <[email protected]>
14
 */
15
16
namespace Backend\View\Helper;
17
18
use Cake\View\Helper;
19
use Backend\View\Helper\Traits\PrepareHelpers;
20
use Core\View\Helper\HtmlHelper as CoreHtmlHelper;
21
22
/**
23
 * Class HtmlHelper
24
 *
25
 * @package Backend\View\Helper
26
 */
27
class HtmlHelper extends CoreHtmlHelper
28
{
29
30
    use PrepareHelpers;
31
32
    /**
33
     * Constructor hook method.
34
     *
35
     * @param array $config
36
     */
37
    public function initialize(array $config)
38
    {
39
        $this->_configWrite('prepareBtnClass', function (Helper $form, $options, $button) {
40
            return $this->_prepareBtn($form, $options, $button);
41
        });
42
        
43
        $this->_configWrite('prepareTooltip', function (Helper $html, $options, $tooltip) {
44
            return $this->_prepareTooltip($html, $options, $tooltip);
45
        });
46
47
        parent::initialize($config);
48
    }
49
}
50