diff options
Diffstat (limited to 'demos/quickstart/protected/controls/RunBar.php')
-rw-r--r-- | demos/quickstart/protected/controls/RunBar.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/demos/quickstart/protected/controls/RunBar.php b/demos/quickstart/protected/controls/RunBar.php new file mode 100644 index 00000000..0d20e0d4 --- /dev/null +++ b/demos/quickstart/protected/controls/RunBar.php @@ -0,0 +1,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';
+ }
+}
+
+?>
\ No newline at end of file |