Passed
Push — master ( 2977bf...424b14 )
by Fabio
15:07 queued 10:08
created

TJuiSelectableTemplate   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
dl 0
loc 26
ccs 0
cts 8
cp 0
rs 10
c 1
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A instantiateIn() 0 3 1
A __construct() 0 4 1
A getIncludedFiles() 0 3 1
1
<?php
2
/**
3
 * TJuiSelectable class file.
4
 *
5
 * @author Fabio Bas <ctrlaltca[at]gmail[dot]com>
6
 * @link https://github.com/pradosoft/prado
7
 * @license https://github.com/pradosoft/prado/blob/master/LICENSE
8
 */
9
10
namespace Prado\Web\UI\JuiControls;
11
12
use Prado\Web\UI\ITemplate;
13
14
/**
15
 * TJuiSelectableTemplate class.
16
 *
17
 * TJuiSelectableTemplate is the default template for TJuiSelectableTemplate
18
 * item template.
19
 *
20
 * @author Wei Zhuo <weizhuo[at]gmail[dot]com>
21
 * @since 3.1
22
 */
23
class TJuiSelectableTemplate extends \Prado\TComponent implements ITemplate
24
{
25
	private $_template;
26
27
	public function __construct($template)
28
	{
29
		$this->_template = $template;
30
		parent::__construct();
31
	}
32
	/**
33
	 * Instantiates the template.
34
	 * It creates a {@link TDataList} control.
35
	 * @param \Prado\Web\UI\TControl $parent parent to hold the content within the template
36
	 */
37
	public function instantiateIn($parent)
38
	{
39
		$parent->getControls()->add($this->_template);
40
	}
41
42
	/**
43
	 * TTemplateManager calls this method for caching the included file modification times.
44
	 * @return array list of included external template files
45
	 */
46
	public function getIncludedFiles()
47
	{
48
		return [];
49
	}
50
}
51