summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/controls/RunBar.php
blob: 0d20e0d47ed1c6010a2378300a715dbae771af03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php

class RunBar extends TTemplateControl
{
	public function getPagePath()
	{
		return $this->getViewState('PagePath','');
	}

	public function setPagePath($value)
	{
		$this->setViewState('PagePath',$value,'');
	}

	protected function onPreRender($param)
	{
		$pagePath=$this->getPagePath();
		$this->RunButton->NavigateUrl="?page=$pagePath";
		$this->ViewSourceButton->NavigateUrl="?page=ViewSource&path=/".strtr($pagePath,'.','/').'.page';
	}
}

?>