public function install()
 {
     parent::install();
     // Sprache einfügen
     $sprache = new Sprache();
     $sprache->sp_bezeichnung = 'Deutsch';
     $sprache->sp_aktiv = true;
     $sprache->sp_standard = true;
     $sprache->sp_iso = 'DE';
     $sprache->save();
 }
 public function install()
 {
     parent::install();
     $administratoren = new Rolle();
     $administratoren->ro_bezeichnung = 'Administratoren';
     $administratoren->ro_aktiv = true;
     $administratoren->ro_parent = 0;
     $administratoren->ro_neuebenutzer = false;
     $administratoren->save();
     $besucher = new Rolle();
     $besucher->ro_bezeichnung = 'Besucher';
     $besucher->ro_aktiv = true;
     $besucher->ro_parent = 0;
     $besucher->ro_neuebenutzer = true;
     $besucher->save();
     $admin = new User();
     $admin->us_benutzername = 'admin';
     $admin->us_passwort = 'masterkey';
     $admin->us_aktiv = 1;
     $admin->us_vorname = 'Administrator';
     $admin->us_anonymous = false;
     $admin->us_sprache = 1;
     $admin->save();
     $anonymous = new User();
     $anonymous->us_benutzername = mt_rand(1000000, 9999999);
     $anonymous->us_passwort = mt_rand(1000000, 9999999);
     $anonymous->us_aktiv = 1;
     $anonymous->us_vorname = 'Anonymous';
     $anonymous->us_anonymous = true;
     $anonymous->us_sprache = 1;
     $anonymous->save();
     $rolle = new UserRolle();
     $rolle->ur_user = $admin->id;
     $rolle->ur_rolle = $administratoren->id;
     $rolle->save();
     $rolle = new UserRolle();
     $rolle->ur_user = $anonymous->id;
     $rolle->ur_rolle = $besucher->id;
     $rolle->save();
 }
 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);
 }