Progress 6 for the dashboards
This commit is contained in:
@@ -14,26 +14,24 @@ class PMDashlet extends DashletInstance implements DashletInterface {
|
|||||||
public function setup($dasInsUid) {
|
public function setup($dasInsUid) {
|
||||||
try {
|
try {
|
||||||
$dashletInstance = $this->getDashletInstance($dasInsUid);
|
$dashletInstance = $this->getDashletInstance($dasInsUid);
|
||||||
//$this->dashletObject = new $dashletInstance['DAS_CLASS']();
|
$this->dashletObject = new $dashletInstance['DAS_CLASS']();
|
||||||
|
$this->dashletObject->setup($dashletInstance);
|
||||||
}
|
}
|
||||||
catch (Exception $error) {
|
catch (Exception $error) {
|
||||||
throw $error;
|
throw $error;
|
||||||
}
|
}
|
||||||
//recupera el registro
|
|
||||||
/*$array = loadDB()
|
|
||||||
//merge
|
|
||||||
$c = new $className();
|
|
||||||
$c->setup($array);*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function render() {
|
public function render() {
|
||||||
try {
|
try {
|
||||||
//
|
if (is_null($this->dashletObject)) {
|
||||||
|
throw new Exception('Please call to the function "setup" before call the function "render".');
|
||||||
|
}
|
||||||
|
$this->dashletObject->render();
|
||||||
}
|
}
|
||||||
catch (Exception $error) {
|
catch (Exception $error) {
|
||||||
throw $error;
|
throw $error;
|
||||||
}
|
}
|
||||||
//$this->c->render();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Own functions
|
// Own functions
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ class Dashboard extends Controller {
|
|||||||
$this->setJSVar('dashletInstance', $this->pmDashlet->getDashletInstance($dasInsUid));
|
$this->setJSVar('dashletInstance', $this->pmDashlet->getDashletInstance($dasInsUid));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$this->setJSVar('dashletInstance', new stdclass());
|
$this->setJSVar('dashletInstance', '');
|
||||||
}
|
}
|
||||||
G::RenderPage('publish', 'extJs');
|
G::RenderPage('publish', 'extJs');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user