19 declare(strict_types=1);
53 $this->target_dir = $export_dir .
"/" .
$sub_dir;
55 $this->co_page_html_export = new \ilCOPageHTMLExport($this->target_dir,
null, 0, $export_collector);
56 $this->global_screen = $DIC->globalScreen();
63 array $standard_icons = []
66 if (is_null($this->export_collector)) {
67 $sys_style_html_export = new \ilSystemStyleHTMLExport($this->target_dir);
68 $sys_style_html_export->export();
71 $asset_dirs = [
"css",
"fonts",
"images/logo",
"images/standard"];
72 foreach ($asset_dirs as $asset_dir) {
74 $asset_dir =
"./assets/" . $asset_dir;
77 $iterator = new \RecursiveIteratorIterator(
79 \RecursiveIteratorIterator::SELF_FIRST
81 foreach ($iterator as $item) {
82 if (!$item->isDir()) {
83 if ($asset_dir ===
"./assets/images/standard" &&
84 !in_array($iterator->getSubPathname(), $standard_icons)) {
87 $this->export_collector->addFile(
89 $asset_dir . DIRECTORY_SEPARATOR . $iterator->getSubPathname()
128 $this->co_page_html_export->setContentStyleId($style_sheet_id);
129 if (is_null($this->export_collector)) {
130 $this->co_page_html_export->createDirectories();
132 $this->co_page_html_export->exportStyles();
133 $this->co_page_html_export->exportSupportScripts();
142 $this->global_screen->tool()->context()->current()->addAdditionalData(
155 $css = $global_screen->
layout()->meta()->getCss();
156 foreach ($css->getItemsInOrderOfDelivery() as $item) {
159 $js = $global_screen->
layout()->meta()->getJs();
160 foreach ($js->getItemsInOrderOfDelivery() as $item) {
170 if (is_int(strpos($file,
"?"))) {
171 $file = substr($file, 0, strpos($file,
"?"));
173 if (is_file($file)) {
174 $dir = dirname($file);
175 if (is_null($this->export_collector)) {
177 if (!is_file($target_dir .
"/" . $file)) {
178 copy($file, $target_dir .
"/" . $file);
181 $this->export_collector->addFile($file, $file);
exportSystemStyle(array $standard_icons=[])
Export system style.
static makeDirParents(string $a_dir)
Create a new directory and all parent directories.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
initGlobalScreen()
Init global screen.
exportResourceFiles()
Export resource files collected by global screen service.
exportResourceFile(string $target_dir, string $file)
Export resource file.
Util This class is an interim solution for the HTML export handling with 6.0.
exportCOPageFiles(int $style_sheet_id=0, string $obj_type="")
Export content style.
static getInstance()
Singleton: get instance for use in ILIAS requests with a config loaded from the settings.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const HTML_EXPORT_RENDERING
ilCOPageHTMLExport $co_page_html_export
__construct(string $export_dir, string $sub_dir, protected ?ExportCollector $export_collector=null)
Constructor.