summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/active-controls/protected/pages/LTemplate.php
blob: f47bbaa48702ba6bea9f1281872c4c894b96a1fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php


/**
 * class file.
 *
 * @license http://opensource.org/licenses/mozilla1.1.php Mozilla Public License
 * @copyright 2005, diemeisterei GmbH. All rights reserved.
 * @author $Author: tobias $
 * @version $Revision: 1.5 $  $Date: 2006/01/03 19:08:05 $
 * @package Lithron
 * @subpackage none
 */

/**
 *
 *
 * @package Lithron
 * @subpackage none
 */

class LTemplate extends TTemplateControl
{
	function __construct()
	{
		parent::__construct();
		$this->setEnableViewState(false);
	}

	function setSize($value)
	{
		$this->setViewState("Size", $value);
	}

	function getSize()
	{
		return $this->getViewState("Size", "Small");
	}

	function onInit($param)
	{
		parent :: onInit($param);
		$this->Controls[] = "OnInit";
	}

	function onLoad($param)
	{
		parent :: onLoad($param);
		$this->Controls[] = "OnLoad";
		$this->adjustLayout();
	}

	function onPreRender($param)
	{
		parent :: onPreRender($param);
		$this->Controls[] = "OnPreRender";
	}

	function adjustLayout()
	{
		if ($this->getSize() == "Large")
		{
			$this->Small->setVisible(false);
		}
		else
		{
			$this->Large->setVisible(false);
		}
	}

}