summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/active-controls/protected/pages/MyTabPanelTest.php
blob: 723af42deeb423fe8c76aa751a8ac6b87f40690e (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
<?php

class MyTabPanelTest extends TPage 
{
	private $panels = array('pnlContentsA', 'pnlContentsB', 'pnlContentsC', );

	private function showPanel($id, $param) 
	{
		foreach($this->panels as $panel) 
		{
			if($id == $panel) 
			{
				$this->$panel->setAttribute('style', 'display: block;');
				$this->$panel->setVisible(true);
				$this->$panel->render($param->NewWriter);
			} 
			else 
			{
				$this->$panel->setVisible(false);
			}
		}
	}

	public function onShowPanelA($sender, $param)
	{
		$this->showPanel('pnlContentsA', $param);
	}
	
	public function onShowPanelB($sender, $param) 
	{
		$this->showPanel('pnlContentsB', $param);
	}
	
	public function onShowPanelC($sender, $param) 
	{
		$this->showPanel('pnlContentsC', $param);
	} 
}



?>