}
 //
 // Prepare install params.
 //
 $params = array('object_remote_map' => array('1bb4fe25487f05527efa8bfd394cecc7' => 14, '5f7f0bdb3381d6a461d8c29ff53d908f' => 11, '15b256dbea2ae72418ff5facc999e8f9' => 42), 'package_object' => $package, 'design_list' => array('ezwebin_site', 'admin'), 'user_siteaccess' => 'ezwebin_site', 'admin_siteaccess' => 'ezwebin_site_admin', 'site_type' => array('access_type' => $accessType, 'access_type_value' => $accessTypeValue, 'admin_access_type_value' => $adminAccessTypeValue), 'all_language_codes' => $locales, 'primary_language' => $primaryLanguage->attribute('locale'), 'host' => $siteINI->variable('SiteSettings', 'SiteURL'));
 $user = eZUser::currentUser();
 $installParameters = array('site_access_map' => array('*' => $userSiteaccess), 'top_nodes_map' => array('*' => 2), 'design_map' => array('*' => 'ezwebin_site'), 'language_map' => array('eng-GB' => $primaryLanguage->attribute('locale')), 'restore_dates' => true, 'user_id' => $user->attribute('contentobject_id'), 'non-interactive' => true);
 //
 // Do the job
 //
 include_once installScriptDir($packageRepository) . "/settings/ezwebininstaller.php";
 $webinInstaller = new eZWebinInstaller($params);
 if (defined('EZWEBIN_INSTALLER_MAJOR_VERSION') && EZWEBIN_INSTALLER_MAJOR_VERSION >= "1.3") {
     $webinInstaller->createSiteAccess(array('src' => array('siteaccess' => $adminSiteaccess), 'dst' => array('siteaccess' => 'ezwebin_site_admin')));
     $webinInstaller->createSiteAccess(array('src' => array('siteaccess' => $userSiteaccess), 'dst' => array('siteaccess' => 'ezwebin_site')));
     $webinInstaller->preInstall();
     installPackages($packageList, $installParameters);
     $webinInstaller->install();
     $siteaccessUrls = $webinInstaller->setting('siteaccess_urls');
 } else {
     //
     // BC for eZWebin < 1.3
     //
     $siteInstaller = new eZSiteInstaller();
     $params['locales'] = $params['all_language_codes'];
     // extra siteaccess based on languages info, like 'eng', 'rus', ...
     $params['language_based_siteaccess_list'] = $siteInstaller->languageNameListFromLocaleList($params['locales']);
     $params['user_siteaccess_list'] = array_merge(array($params['user_siteaccess']), $params['language_based_siteaccess_list']);
     $params['all_siteaccess_list'] = array_merge($params['user_siteaccess_list'], $params['admin_siteaccess']);
     $params['main_site_design'] = 'ezwebin';
     // Create siteaccesses URLs
Exemple #2
0
function eZSitePreInstall()
{
    $installer = new eZWebinInstaller(array('var_dir' => 'var/ezwebin_site'));
    $installer->preInstall();
}