Completed
Push — master ( 38e498...56f074 )
by Cheren
05:18
created

AssetsHelper::jquery()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
/**
3
 * CakeCMS Core
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   Core
10
 * @license   MIT
11
 * @copyright MIT License http://www.opensource.org/licenses/mit-license.php
12
 * @link      https://github.com/CakeCMS/Core".
13
 * @author    Sergey Kalistratov <[email protected]>
14
 */
15
16
namespace Core\View\Helper;
17
18
/**
19
 * Class AssetsHelper
20
 *
21
 * @package Core\View\Helper
22
 * @property \Cake\View\Helper\HtmlHelper $Html
23
 */
24
class AssetsHelper extends AppHelper
25
{
26
27
    /**
28
     * Use helpers.
29
     *
30
     * @var array
31
     */
32
    public $helpers = [
33
        'Html',
34
    ];
35
36
    /**
37
     * Default assets options.
38
     *
39
     * @var array
40
     */
41
    protected $_options = [
42
        'block'    => true,
43
        'fullBase' => true,
44
    ];
45
46
    /**
47
     * Include jquery lib.
48
     *
49
     * @return $this
50
     */
51
    public function jquery()
52
    {
53
        $this->Html->script('libs/jquery.min.js', $this->_options);
54
        return $this;
55
    }
56
}
57