コード例 #1
0
 function install(&$pluginAPI, &$dbDriver, $siteDefaultLanguage)
 {
     $pageM = new PageManager($dbDriver);
     $pageM->installAllTables();
     $site = $pageM->getSitePage();
     $t =& $pluginAPI->getI18NManager();
     $home = $pageM->newPage();
     $home->initFromArray(array('name' => 'MorgOS_Home', 'parent_page_id' => $site->getID(), 'place_in_menu' => MORGOS_MENU_FIRST));
     $pageM->addPageToDatabase($home);
     $tHome = $pageM->newTranslatedPage();
     $tHome->initFromArray(array('language_code' => $siteDefaultLanguage, 'translated_title' => $t->translate('Home'), 'translated_content' => $t->translate('This is the homepage.')));
     $home->addTranslation($tHome);
     $this->_adminPlugin->install($pluginAPI, $dbDriver, $siteDefaultLanguage);
 }