Completed
Push — namespace2 ( 791eac...5c23fb )
by Fabio
08:41
created

TJuiSelectableTemplate::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
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
 * @copyright Copyright &copy; 2013-2014 PradoSoft
8
 * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT
9
 * @package Prado\Web\UI\JuiControls
10
 */
11
12
namespace Prado\Web\UI\JuiControls;
13
use Prado\Web\UI\ITemplate;
14
15
/**
16
 * TJuiSelectableTemplate class.
17
 *
18
 * TJuiSelectableTemplate is the default template for TJuiSelectableTemplate
19
 * item template.
20
 *
21
 * @author Wei Zhuo <weizhuo[at]gmail[dot]com>
22
 * @package Prado\Web\UI\JuiControls
23
 * @since 3.1
24
 */
25
class TJuiSelectableTemplate extends \Prado\TComponent implements ITemplate
26
{
27
	private $_template;
28
29
	public function __construct($template)
30
	{
31
		$this->_template = $template;
32
	}
33
	/**
34
	 * Instantiates the template.
35
	 * It creates a {@link TDataList} control.
36
	 * @param TControl parent to hold the content within the template
37
	 */
38
	public function instantiateIn($parent)
39
	{
40
		$parent->getControls()->add($this->_template);
41
	}
42
}