summaryrefslogtreecommitdiff
path: root/framework/Data/ActiveRecord/Scaffold/TScaffoldView.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Data/ActiveRecord/Scaffold/TScaffoldView.php')
-rw-r--r--framework/Data/ActiveRecord/Scaffold/TScaffoldView.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/framework/Data/ActiveRecord/Scaffold/TScaffoldView.php b/framework/Data/ActiveRecord/Scaffold/TScaffoldView.php
index 668ede61..5401c764 100644
--- a/framework/Data/ActiveRecord/Scaffold/TScaffoldView.php
+++ b/framework/Data/ActiveRecord/Scaffold/TScaffoldView.php
@@ -3,6 +3,7 @@
Prado::using('System.Data.ActiveRecord.Scaffold.TScaffoldBase');
Prado::using('System.Data.ActiveRecord.Scaffold.TScaffoldListView');
Prado::using('System.Data.ActiveRecord.Scaffold.TScaffoldEditView');
+Prado::using('System.Data.ActiveRecord.Scaffold.TScaffoldSearch');
class TScaffoldView extends TScaffoldBase
{
@@ -11,6 +12,7 @@ class TScaffoldView extends TScaffoldBase
parent::onLoad($param);
$this->getListView()->copyFrom($this);
$this->getEditView()->copyFrom($this);
+ $this->getSearchControl()->copyFrom($this);
}
public function getListView()
@@ -25,6 +27,12 @@ class TScaffoldView extends TScaffoldBase
return $this->getRegisteredObject('_editView');
}
+ public function getSearchControl()
+ {
+ $this->ensureChildControls();
+ return $this->getRegisteredObject('_search');
+ }
+
public function getAddButton()
{
$this->ensureChildControls();
@@ -50,6 +58,7 @@ class TScaffoldView extends TScaffoldBase
$this->getListView()->setVisible(false);
$this->getEditView()->setVisible(true);
$this->getAddButton()->setVisible(false);
+ $this->getSearchControl()->setVisible(false);
$this->getEditView()->getCancelButton()->setVisible(true);
$this->getEditView()->getClearButton()->setVisible(false);
}
@@ -59,6 +68,7 @@ class TScaffoldView extends TScaffoldBase
$this->getListView()->setVisible(true);
$this->getEditView()->setVisible(false);
$this->getAddButton()->setVisible(true);
+ $this->getSearchControl()->setVisible(true);
}
protected function showAddView($sender, $param)