Beispiel #1
0
/* @var $phpbb_filesystem \phpbb\filesystem\filesystem_interface */
$phpbb_filesystem = $phpbb_container->get('filesystem');
/* @var $phpbb_path_helper \phpbb\path_helper */
$phpbb_path_helper = $phpbb_container->get('path_helper');
$cache_path = $phpbb_root_path . 'cache/';
$twig_environment = new \phpbb\template\twig\environment($config, $phpbb_filesystem, $phpbb_path_helper, $phpbb_container, $cache_path, null, $phpbb_container->get('template.twig.loader'));
$language_loader = new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx);
$phpbb_container->set('template.twig.environment', $twig_environment);
$phpbb_container->set('language.loader', $language_loader);
$twig_context = new \phpbb\template\context();
$template = new \phpbb\template\twig\twig($phpbb_path_helper, $config, $twig_context, $twig_environment, $cache_path, $user, array($phpbb_container->get('template.twig.extensions.phpbb')));
$paths = array($phpbb_root_path . 'install/update/new/adm/style', $phpbb_admin_path . 'style');
$paths = array_filter($paths, 'is_dir');
$template->set_custom_style(array(array('name' => 'adm', 'ext_path' => 'adm/style/')), $paths);
$path = array_shift($paths);
$template->assign_var('T_ASSETS_PATH', $path . '/../../assets');
$template->assign_var('T_TEMPLATE_PATH', $path);
$install = new module();
$install->create('install', "index.{$phpEx}", $mode, $sub);
$install->load();
// Generate the page
$install->page_header();
$install->generate_navigation();
$template->set_filenames(array('body' => $install->get_tpl_name()));
$install->page_footer();
class module
{
    var $id = 0;
    var $type = 'install';
    var $module_ary = array();
    var $filename;