BWDisplay   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setTemplate() 0 7 2
A displayContent() 0 6 1
1
<?php
2
/*
3
* 2007-2014 PrestaShop
4
*
5
* NOTICE OF LICENSE
6
*
7
* This source file is subject to the Open Software License (OSL 3.0)
8
* that is bundled with this package in the file LICENSE.txt.
9
* It is also available through the world-wide-web at this URL:
10
* http://opensource.org/licenses/osl-3.0.php
11
* If you did not receive a copy of the license and are unable to
12
* obtain it through the world-wide-web, please send an email
13
* to [email protected] so we can send you a copy immediately.
14
*
15
* DISCLAIMER
16
*
17
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
18
* versions in the future. If you wish to customize PrestaShop for your
19
* needs please refer to http://www.prestashop.com for more information.
20
*
21
*  @author PrestaShop SA <[email protected]>
22
*  @copyright  2007-2014 PrestaShop SA
23
*  @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
24
*  International Registered Trademark & Property of PrestaShop SA
25
*/
26
27
/**
28
 * Class allow to display tpl on the FO
29
 */
30
class BWDisplay extends FrontController
31
{
32
    // Assign template, on 1.4 create it else assign for 1.5
33
    public function setTemplate($template)
34
    {
35
        if (_PS_VERSION_ >= '1.5')
36
            parent::setTemplate($template);
37
        else
38
            $this->template = $template;
39
    }
40
41
    // Overload displayContent for 1.4
42
    public function displayContent()
43
    {
44
        parent::displayContent();
45
46
        echo Context::getContext()->smarty->fetch($this->template);
47
    }
48
}
49