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

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

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

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