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

class ReplaceContentTest extends TPage
{
	function appendContent($sender, $param)
	{
		$this->CallbackClient->appendContent($this->subpanel, $this->replacementContent());
	}

	function prependContent($sender, $param)
	{
		$this->CallbackClient->prependContent($this->subpanel, $this->replacementContent());
	}

	function insertContentBefore($sender, $param)
	{
		$this->CallbackClient->insertContentBefore($this->subpanel, $this->replacementContent());
	}

	function insertContentAfter($sender, $param)
	{
		$this->CallbackClient->insertContentAfter($this->subpanel, $this->replacementContent());
	}

	function replaceContent($sender, $param)
	{
		$this->CallbackClient->replaceContent($this->subpanel, $this->replacementContent());
	}

	function replacementContent()
	{
		if($this->check1->Checked)
		{
			$this->newPanel->Visible=true;
			return $this->newPanel;
		}
		else
			return $this->content->Text;
	}
}