ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.GUIService.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\Style\Content;
22
26
32{
34
35 public function __construct(
36 InternalService $internal_service
37 ) {
38 $this->internal = $internal_service;
39 }
40
41 public function objectSettingsClass(bool $lower = true): string
42 {
43 return $this->internal->gui()->objectSettingsClass($lower);
44 }
45
47 ?int $selected_style_id,
48 int $ref_id
50 return $this->internal->gui()->objectSettingsGUI(
51 $selected_style_id,
53 );
54 }
55
57 ?int $selected_style_id,
58 int $obj_id
60 return $this->internal->gui()->objectSettingsGUI(
61 $selected_style_id,
62 0,
63 $obj_id
64 );
65 }
66
67
68 public function redirectToObjectSettings(): void
69 {
70 $this->internal->gui()->ctrl()->redirectByClass(
71 $this->objectSettingsClass(),
72 ""
73 );
74 }
75
76 // add effective style sheet path to global template
77 public function addCss(ilGlobalTemplateInterface $tpl, int $ref_id, int $obj_id = 0): void
78 {
79 $eff_style_id = $this->internal->domain()->object($ref_id, $obj_id)->getEffectiveStyleId();
80 $tpl->addCss(ilObjStyleSheet::getContentStylePath($eff_style_id));
81 }
82}
Repository internal service.
Facade for consumer gui interface.
objectSettingsGUIForRefId(?int $selected_style_id, int $ref_id)
addCss(ilGlobalTemplateInterface $tpl, int $ref_id, int $obj_id=0)
__construct(InternalService $internal_service)
objectSettingsGUIForObjId(?int $selected_style_id, int $obj_id)
objectSettingsClass(bool $lower=true)
Class ilObjStyleSheet.
static getContentStylePath(int $a_style_id, bool $add_random=true, bool $add_token=true)
get content style path static (to avoid full reading)
Style settings of a repository object.
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addCss(string $a_css_file, string $media="screen")
Add a css file that should be included in the header.
$ref_id
Definition: ltiauth.php:66