Progress 4 for the dashboards

This commit is contained in:
Julio Cesar Laura
2011-10-31 15:14:01 -04:00
parent c167a54174
commit 847b56f3f7
4 changed files with 39 additions and 4 deletions

View File

@@ -7,12 +7,14 @@ require_once 'model/DashletInstance.php';
class PMDashlet extends DashletInstance implements DashletInterface { class PMDashlet extends DashletInstance implements DashletInterface {
// Own properties // Own properties
private $dashletObject;
// Interface functions // Interface functions
public function setup($dasInsUid) { public function setup($dasInsUid) {
try { try {
// //$dashletInstance = $this->getDashletInstance($dasInsUid);
//$this->dashletObject = new $
} }
catch (Exception $error) { catch (Exception $error) {
throw $error; throw $error;
@@ -54,6 +56,15 @@ class PMDashlet extends DashletInstance implements DashletInterface {
} }
} }
public function getDashletInstance($dasInsUid) {
try {
//
}
catch (Exception $error) {
throw $error;
}
}
public function saveDashletInstance($data) { public function saveDashletInstance($data) {
try { try {
// //

View File

@@ -6,7 +6,7 @@ require_once 'classes/model/om/BaseDashlet.php';
/** /**
* Skeleton subclass for representing a row from the 'DASHLET' table. * Skeleton subclass for representing a row from the 'DASHLET' table.
* *
* *
* *
* You should add additional methods to this class to meet the * You should add additional methods to this class to meet the
* application requirements. This class will only be generated as * application requirements. This class will only be generated as
@@ -16,4 +16,14 @@ require_once 'classes/model/om/BaseDashlet.php';
*/ */
class Dashlet extends BaseDashlet { class Dashlet extends BaseDashlet {
public function load($dasUid) {
try {
$dashlet = DashletPeer::retrieveByPK($dasUid);
return $dashlet->toArray(BasePeer::TYPE_FIELDNAME);
}
catch (Exception $error) {
throw $error;
}
}
} // Dashlet } // Dashlet

View File

@@ -6,7 +6,7 @@ require_once 'classes/model/om/BaseDashletInstance.php';
/** /**
* Skeleton subclass for representing a row from the 'DASHLET_INSTANCE' table. * Skeleton subclass for representing a row from the 'DASHLET_INSTANCE' table.
* *
* *
* *
* You should add additional methods to this class to meet the * You should add additional methods to this class to meet the
* application requirements. This class will only be generated as * application requirements. This class will only be generated as
@@ -16,4 +16,18 @@ require_once 'classes/model/om/BaseDashletInstance.php';
*/ */
class DashletInstance extends BaseDashletInstance { class DashletInstance extends BaseDashletInstance {
public function load($dasInsUid) {
try {
$dashletInstance = DashletInstancePeer::retrieveByPK($dasInsUid);
$fields = $dashletInstance->toArray(BasePeer::TYPE_FIELDNAME);
if ($fields['DAS_INS_ADDITIONAL_PROPERTIES'] != '') {
$fields = array_merge($fields, unserialize($fields['DAS_INS_ADDITIONAL_PROPERTIES']));
}
return $fields;
}
catch (Exception $error) {
throw $error;
}
}
} // DashletInstance } // DashletInstance

View File

@@ -8,7 +8,7 @@
class Dashboard extends Controller { class Dashboard extends Controller {
// Class properties // Class properties
private pmDashlet; private $pmDashlet;
// Class constructor // Class constructor
public function __construct() { public function __construct() {