summaryrefslogtreecommitdiff
path: root/framework/Wsat/pages
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Wsat/pages')
-rw-r--r--framework/Wsat/pages/TWsatGenerateAR.php31
-rw-r--r--framework/Wsat/pages/TWsatHome.php11
-rw-r--r--framework/Wsat/pages/TWsatLogin.php20
-rw-r--r--framework/Wsat/pages/TWsatScaffolding.php11
4 files changed, 38 insertions, 35 deletions
diff --git a/framework/Wsat/pages/TWsatGenerateAR.php b/framework/Wsat/pages/TWsatGenerateAR.php
index d5934686..14e14983 100644
--- a/framework/Wsat/pages/TWsatGenerateAR.php
+++ b/framework/Wsat/pages/TWsatGenerateAR.php
@@ -11,32 +11,40 @@
*/
Prado::using("System.Wsat.TWsatARGenerator");
-class TWsatGenerateAR extends TPage {
+class TWsatGenerateAR extends TPage
+{
- public function generate($sender) {
- if ($this->IsValid) {
+ public function generate($sender)
+ {
+ if ($this->IsValid)
+ {
$table_name = $this->table_name->Text;
$output_folder_ns = $this->output_folder->Text;
$class_prefix = $this->class_prefix->Text;
$class_sufix = $this->class_sufix->Text;
- try {
+ try
+ {
$ar_generator = new TWsatARGenerator();
$ar_generator->setOpFile($output_folder_ns);
$ar_generator->setClasPrefix($class_prefix);
$ar_generator->setClassSufix($class_sufix);
- if ($this->build_rel->Checked) {
+ if ($this->build_rel->Checked)
+ {
$ar_generator->buildRelations();
}
- if ($table_name != "*") {
+ if ($table_name != "*")
+ {
$ar_generator->generate($table_name);
- } else {
+ } else
+ {
$ar_generator->generateAll();
}
$this->feedback_panel->CssClass = "green_panel";
$this->generation_msg->Text = "The code has been generated successfully.";
- } catch (Exception $ex) {
+ } catch (Exception $ex)
+ {
$this->feedback_panel->CssClass = "red_panel";
$this->generation_msg->Text = $ex->getMessage();
}
@@ -44,12 +52,11 @@ class TWsatGenerateAR extends TPage {
}
}
- public function preview($sender) {
+ public function preview($sender)
+ {
// $ar_generator = new TWsatARGenerator();
// $ar_generator->renderAllTablesInformation();
throw new THttpException(500, "Not implemented yet.");
}
-}
-
-?> \ No newline at end of file
+} \ No newline at end of file
diff --git a/framework/Wsat/pages/TWsatHome.php b/framework/Wsat/pages/TWsatHome.php
index 035dd7c6..c5291ed7 100644
--- a/framework/Wsat/pages/TWsatHome.php
+++ b/framework/Wsat/pages/TWsatHome.php
@@ -9,12 +9,9 @@
* @since 3.3
* @package Wsat.pages
*/
-
Prado::using("System.Wsat.TWsatARGenerator");
-class TWsatHome extends TPage {
-
-
-}
-
-?> \ No newline at end of file
+class TWsatHome extends TPage
+{
+
+} \ No newline at end of file
diff --git a/framework/Wsat/pages/TWsatLogin.php b/framework/Wsat/pages/TWsatLogin.php
index 7c4570af..4b3ba0c1 100644
--- a/framework/Wsat/pages/TWsatLogin.php
+++ b/framework/Wsat/pages/TWsatLogin.php
@@ -9,28 +9,30 @@
* @since 3.3
* @package Wsat.pages
*/
+class TWsatLogin extends TPage
+{
-class TWsatLogin extends TPage {
-
- public function login() {
- if ($this->IsValid) {
+ public function login()
+ {
+ if ($this->IsValid)
+ {
$this->Session["wsat_password"] = $this->getService()->getPassword();
$authManager = $this->Application->getModule('auth');
$url = $authManager->ReturnUrl;
- if (empty($url)) {
+ if (empty($url))
+ {
$url = $this->Service->constructUrl('TWsatHome');
}
$this->Response->redirect($url);
}
}
- public function validatePassword($sender, $param) {
+ public function validatePassword($sender, $param)
+ {
$config_pass = $this->getService()->getPassword();
$user_pass = $this->password->Text;
$param->IsValid = $user_pass === $config_pass;
}
-}
-
-?> \ No newline at end of file
+} \ No newline at end of file
diff --git a/framework/Wsat/pages/TWsatScaffolding.php b/framework/Wsat/pages/TWsatScaffolding.php
index 2fc036ad..b8e28b03 100644
--- a/framework/Wsat/pages/TWsatScaffolding.php
+++ b/framework/Wsat/pages/TWsatScaffolding.php
@@ -9,12 +9,9 @@
* @since 3.3
* @package Wsat.pages
*/
-
Prado::using("System.Wsat.TWsatARGenerator");
-class TWsatScaffolding extends TPage {
-
-
-}
-
-?> \ No newline at end of file
+class TWsatScaffolding extends TPage
+{
+
+} \ No newline at end of file