diff options
author | Daniel <darthdaniel85@gmail.com> | 2014-10-22 18:03:30 -0500 |
---|---|---|
committer | Daniel <darthdaniel85@gmail.com> | 2014-10-22 18:03:30 -0500 |
commit | bd341e6469cbd49a35711b732386dc56a3c59ed0 (patch) | |
tree | 470dd452d5539e70c7d118587fd4b7701881097c /framework/Wsat/pages/TWsatScaffolding.php | |
parent | 0cc7b59c95cb3bf5103450cf858f71fdb150458b (diff) |
Scaffolding 5%
Diffstat (limited to 'framework/Wsat/pages/TWsatScaffolding.php')
-rw-r--r-- | framework/Wsat/pages/TWsatScaffolding.php | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/framework/Wsat/pages/TWsatScaffolding.php b/framework/Wsat/pages/TWsatScaffolding.php index fe691dd9..7352b2ae 100644 --- a/framework/Wsat/pages/TWsatScaffolding.php +++ b/framework/Wsat/pages/TWsatScaffolding.php @@ -9,9 +9,41 @@ * @since 3.3 * @package Wsat.pages */ -Prado::using("System.Wsat.TWsatARGenerator"); +Prado::using("System.Wsat.TWsatScaffoldingGenerator"); class TWsatScaffolding extends TPage { + public function onInit($param) + { + parent::onInit($param); + if (!$this->IsPostBack) + { + $this->startVisual(); + } + } + + private function startVisual() + { + $scf_generator = new TWsatScaffoldingGenerator(); + foreach ($scf_generator->getAllTableNames() as $tableName) + { + $dynChb = new TCheckBox(); + $dynChb->ID = $tableName; + $dynChb->Text = ucfirst($tableName); + $dynChb->Checked = true; + $this->tableNames->getControls()->add($dynChb); + + } + } + + public function generate($sender) + { + if ($this->IsValid) + { + $scf_generator = new TWsatScaffoldingGenerator(); + $scf_generator->renderAllTablesInformation(); + } + } + }
\ No newline at end of file |