/**
  *
  */
 public function install()
 {
     Logging::info('Installiere Modul ' . $this->getModulename());
     $module = Modules::getModule($this->getModulename());
     $this->migrateDatabase();
     Logging::info('Vergebe Berechtigungen');
     foreach ($module->actions as $action) {
         /**@var Action $action */
         if ($action->securityLevel === Action::LEVEL_CONFIG) {
             Security::berechtigungSchreiben($action->getSecurityToken(), self::ID_ADMIN_ROLLE, 1);
         }
     }
 }
 public function install()
 {
     parent::install();
     // Datensätze anlegen
     $site = new Site();
     $site->si_bezeichnung = 'Administration';
     $site->si_name = 'admin';
     $site->si_urlpattern = 'admin.php';
     $site->si_template = 'bootadmin';
     $site->save();
     // Struktur-Eintrag im Menü
     $page = new Page();
     $page->pa_site = $site->id;
     $page->pa_parent = 0;
     $page->pa_bezeichnung = 'Struktur';
     $page->pa_link = 'struktur';
     $page->pa_pos = 0;
     $page->pa_title = 'Struktur';
     $page->pa_module = 'site';
     $page->pa_action = 'useInnerTemplate';
     $page->pa_haschildren = false;
     $page->pa_innertemplate = 'normal';
     $page->save();
     $region = new Region();
     $region->re_page = $page->id;
     $region->re_name = 'main';
     $region->re_module = 'site';
     $region->re_action = 'showSite';
     $region->re_position = 1;
     $region->save();
     Security::berechtigungSchreiben($page->getElementId(), 1, 1);
     Text::saveArray($page->getElementId(), array(1 => 'Struktur'));
     // Benutzer-Eintrag im Menü
     $page = new Page();
     $page->pa_site = $site->id;
     $page->pa_parent = 0;
     $page->pa_bezeichnung = 'Benutzer';
     $page->pa_link = 'benutzer';
     $page->pa_pos = 0;
     $page->pa_title = 'Benutzer';
     $page->pa_module = 'site';
     $page->pa_action = 'useInnerTemplate';
     $page->pa_haschildren = false;
     $page->pa_innertemplate = 'normal';
     $page->save();
     $region = new Region();
     $region->re_page = $page->id;
     $region->re_name = 'main';
     $region->re_module = 'user';
     $region->re_action = 'indexUser';
     $region->re_position = 1;
     $region->save();
     Security::berechtigungSchreiben($page->getElementId(), 1, 1);
     Text::saveArray($page->getElementId(), array(1 => 'Benutzer'));
     // Modul-Eintrag im Menü
     $page = new Page();
     $page->pa_site = $site->id;
     $page->pa_parent = 0;
     $page->pa_bezeichnung = 'Module';
     $page->pa_link = 'module';
     $page->pa_pos = 0;
     $page->pa_title = 'Module';
     $page->pa_module = 'site';
     $page->pa_action = 'useInnerTemplate';
     $page->pa_haschildren = false;
     $page->pa_innertemplate = 'normal';
     $page->save();
     $region = new Region();
     $region->re_page = $page->id;
     $region->re_name = 'main';
     $region->re_module = 'modView';
     $region->re_action = 'showModules';
     $region->re_position = 1;
     $region->save();
     Security::berechtigungSchreiben($page->getElementId(), 1, 1);
     Text::saveArray($page->getElementId(), array(1 => 'Module'));
     // Site-Definition Frontend
     $site = new Site();
     $site->si_bezeichnung = 'Webseite';
     $site->si_name = 'web';
     $site->si_urlpattern = '';
     $site->si_template = 'unify';
     $site->save();
 }
 public function install()
 {
     parent::install();
     Security::berechtigungSchreiben('ModView_newModule', 1, 1);
 }