public function overview_action() { Navigation::activateItem("/lernmarktplatz/mymaterial"); $this->materialien = LernmarktplatzMaterial::findMine(); }
public function getHomepageTemplate($user_id) { $materialien = LernmarktplatzMaterial::findMine($user_id); if (count($materialien)) { $template_factory = new Flexi_TemplateFactory(__DIR__ . "/views"); $template = $template_factory->open("mymaterial/_material_list"); $template->set_attribute("plugin", $this); $template->set_attribute("materialien", $materialien); $template->set_attribute("title", _("Lernmaterialien")); $template->set_attribute("icon_url", Icon::create("service", "clickable")->asImagePath()); return $template; } else { return null; } }