Completed
Push — master ( 9431b1...6a8e13 )
by AJ
01:57
created

SubdomainHtmlHelper::link()   B

Complexity

Conditions 6
Paths 4

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 11
rs 8.8571
cc 6
eloc 6
nc 4
nop 3
1
<?php
2
/**
3
 * CakePHP Plugin : CakePHP Subdomain Routing
4
 * Copyright (c) Multidimension.al (http://multidimension.al)
5
 * Github : https://github.com/multidimension-al/cakephp-subdomains
6
 *
7
 * Licensed under The MIT License
8
 * For full copyright and license information, please see the LICENSE file
9
 * Redistributions of files must retain the above copyright notice.
10
 *
11
 * @copyright (c) Multidimension.al (http://multidimension.al)
12
 * @link      https://github.com/multidimension-al/cakephp-subdomains Github
13
 * @license   http://www.opensource.org/licenses/mit-license.php MIT License
14
 */
15
16
namespace Multidimensional\Subdomains\View\Helper;
17
18
use Cake\View\Helper\HtmlHelper;
19
20
class SubdomainHtmlHelper extends HtmlHelper
21
{
22
23
    public function link($title, $url = null, array $options = [])
24
    {
25
        if (isset($url['prefix']) && $url['prefix'] === false) {
26
            $url['prefix'] = "false";
27
        }
28
        if (is_array($title) && isset($title['prefix']) && $title['prefix'] === false) {
29
            $title['prefix'] = "false";
30
        }
31
32
        return parent::link($title, $url, $options);
33
    }
34
}
35