diff options
author | ctrlaltca <> | 2012-07-12 11:21:01 +0000 |
---|---|---|
committer | ctrlaltca <> | 2012-07-12 11:21:01 +0000 |
commit | 903ae8a581fac1e6917fc3e31d2ad8fb91df80c3 (patch) | |
tree | e08bf04f0823650a231227ac3499121270172a23 /demos/quickstart/protected/controls/Layout.php | |
parent | 3e4e6e66aeb3f8fea4e1eb4237498ef9d2358f63 (diff) |
standardize the use of unix eol; use svn properties to enforce native eol
Diffstat (limited to 'demos/quickstart/protected/controls/Layout.php')
-rw-r--r-- | demos/quickstart/protected/controls/Layout.php | 94 |
1 files changed, 47 insertions, 47 deletions
diff --git a/demos/quickstart/protected/controls/Layout.php b/demos/quickstart/protected/controls/Layout.php index 3973db8f..5106a72b 100644 --- a/demos/quickstart/protected/controls/Layout.php +++ b/demos/quickstart/protected/controls/Layout.php @@ -1,48 +1,48 @@ -<?php
-
-class Layout extends TTemplateControl
-{
- public function __construct()
- {
- if(isset($this->Request['notheme']))
- $this->Service->RequestedPage->EnableTheming=false;
- parent::__construct();
- }
-
- public function onLoad($param)
- {
- parent::onLoad($param);
- $url=$this->Request->RequestUri;
- if(strpos($url,'?')===false)
- $url.='?notheme=true';
- else
- $url.='&notheme=true';
- $this->PrinterLink->NavigateUrl=$url;
-
- if(isset($this->Request['notheme']))
- {
- $this->MainMenu->Visible=false;
- $this->TopicPanel->Visible=false;
- }
-
- $this->languages->DataSource = TPropertyValue::ensureArray($this->Application->Parameters['languages']);
- $this->languages->dataBind();
- }
-
- public function languageLinkCreated($sender, $param)
- {
- $item = $param->Item;
- if($item->ItemType == TListItemType::Item || $item->ItemType == TListItemType::AlternatingItem)
- {
- $params = $this->Request->toArray();
- $params['lang'] = $sender->DataKeys[$item->ItemIndex];
- unset($params[$this->Request->ServiceID]);
- $url = $this->Service->ConstructUrl($this->Service->RequestedPagePath, $params);
- $item->link->NavigateUrl = $url;
- if($this->Application->Globalization->Culture == $params['lang'])
- $item->link->CssClass="active";
- }
- }
-}
-
+<?php + +class Layout extends TTemplateControl +{ + public function __construct() + { + if(isset($this->Request['notheme'])) + $this->Service->RequestedPage->EnableTheming=false; + parent::__construct(); + } + + public function onLoad($param) + { + parent::onLoad($param); + $url=$this->Request->RequestUri; + if(strpos($url,'?')===false) + $url.='?notheme=true'; + else + $url.='&notheme=true'; + $this->PrinterLink->NavigateUrl=$url; + + if(isset($this->Request['notheme'])) + { + $this->MainMenu->Visible=false; + $this->TopicPanel->Visible=false; + } + + $this->languages->DataSource = TPropertyValue::ensureArray($this->Application->Parameters['languages']); + $this->languages->dataBind(); + } + + public function languageLinkCreated($sender, $param) + { + $item = $param->Item; + if($item->ItemType == TListItemType::Item || $item->ItemType == TListItemType::AlternatingItem) + { + $params = $this->Request->toArray(); + $params['lang'] = $sender->DataKeys[$item->ItemIndex]; + unset($params[$this->Request->ServiceID]); + $url = $this->Service->ConstructUrl($this->Service->RequestedPagePath, $params); + $item->link->NavigateUrl = $url; + if($this->Application->Globalization->Culture == $params['lang']) + $item->link->CssClass="active"; + } + } +} + ?>
\ No newline at end of file |