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/SearchBox.php | |
parent | 3e4e6e66aeb3f8fea4e1eb4237498ef9d2358f63 (diff) |
standardize the use of unix eol; use svn properties to enforce native eol
Diffstat (limited to 'demos/quickstart/protected/controls/SearchBox.php')
-rw-r--r-- | demos/quickstart/protected/controls/SearchBox.php | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/demos/quickstart/protected/controls/SearchBox.php b/demos/quickstart/protected/controls/SearchBox.php index 2e74ae31..e13d5e46 100644 --- a/demos/quickstart/protected/controls/SearchBox.php +++ b/demos/quickstart/protected/controls/SearchBox.php @@ -1,41 +1,41 @@ -<?php
-
-class SearchBox extends TTemplateControl
-{
- public function getText()
- {
- $this->ensureChildControls();
- return $this->getRegisteredObject('search')->getText();
- }
-
- public function getTextBox()
- {
- $this->ensureChildControls();
- return $this->getRegisteredObject('search');
- }
-
- public function getButton()
- {
- $this->ensureChildControls();
- return $this->getRegisteredObject('find');
- }
-
- public function onInit($param)
- {
- parent::onInit($param);
- if(strlen($q = $this->Page->Request['q']) > 0)
- $this->search->setText($q);
- }
-
- public function doSearch($sender, $param)
- {
- if(strlen($query = $this->search->getText()) >0)
- {
- $ps = $this->getApplication()->getService();
- $page = $ps->constructUrl('Search', array('q' => $query), false);
- $this->getApplication()->getResponse()->redirect($page);
- }
- }
-}
-
+<?php + +class SearchBox extends TTemplateControl +{ + public function getText() + { + $this->ensureChildControls(); + return $this->getRegisteredObject('search')->getText(); + } + + public function getTextBox() + { + $this->ensureChildControls(); + return $this->getRegisteredObject('search'); + } + + public function getButton() + { + $this->ensureChildControls(); + return $this->getRegisteredObject('find'); + } + + public function onInit($param) + { + parent::onInit($param); + if(strlen($q = $this->Page->Request['q']) > 0) + $this->search->setText($q); + } + + public function doSearch($sender, $param) + { + if(strlen($query = $this->search->getText()) >0) + { + $ps = $this->getApplication()->getService(); + $page = $ps->constructUrl('Search', array('q' => $query), false); + $this->getApplication()->getResponse()->redirect($page); + } + } +} + ?>
\ No newline at end of file |