コード例 #1
0
 public static function getDashboardList()
 {
     $theme = $_SESSION["auth"]['theme'];
     $theme_layout = ThemeLayout::findFirstByName($theme);
     echo count($theme_layout);
     $dashboards = $theme_layout->ThemeDashboard;
     return $dashboards;
 }
コード例 #2
0
 public function editAction($id)
 {
     $theme = ThemeLayout::findFirstById($id);
     if (!$theme) {
         $this->flash->error("Theme was not found");
         return $this->dispatcher->forward(array("controller" => "ThemeCreator", "action" => "index"));
     }
     $this->tag->setDefault("id", $theme->id);
     $this->tag->setDefault("name", $theme->name);
     $this->view->setVar("theme_id", $theme->id);
     $portlets = $theme->ThemePortlet;
     $dashboards = $theme->ThemeDashboard;
     $widgets = $theme->ThemeWidget;
     $logins = $theme->ThemeLogin;
     $this->view->setVar("portlets", $portlets);
     $this->view->setVar("dashboards", $dashboards);
     $this->view->setVar("widgets", $widgets);
     $this->view->setVar("logins", $logins);
 }