19 declare(strict_types=1);
39 protected string $mode = self::MODE_MODAL;
56 $this->
http = $DIC->http();
58 $this->
lng = $DIC->language();
59 $this->
ctrl = $DIC->ctrl();
64 $this->appointment = $a_app;
66 $this->tpl = $DIC->ui()->mainTemplate();
76 $this->list_item = $a_val;
77 $this->mode = self::MODE_LIST_ITEM;
90 return new static(
$seed, $a_app);
95 $next_class = $this->
ctrl->getNextClass($this);
96 $cmd = $this->
ctrl->getCmd(
"getHTML");
98 switch ($next_class) {
99 case 'ilcalendarappointmentgui':
101 if ($this->
http->wrapper()->query()->has(
'app_id')) {
102 $app_id = $this->
http->wrapper()->query()->retrieve(
108 $this->
ctrl->forwardCommand($app);
112 if ($next_class !=
'') {
114 $class_path = $this->
ctrl->lookupClassPath($next_class);
117 $class_name = $this->
ctrl->getClassForClasspath($class_path);
118 if (in_array(
"ilCalendarAppointmentPresentation", class_implements($class_name))) {
120 $gui_class =
new $class_name($this->appointment, $this->info_screen, $this->
toolbar,
null);
121 $this->
ctrl->forwardCommand($gui_class);
138 if ($this->mode == self::MODE_MODAL) {
141 if ($this->mode == self::MODE_LIST_ITEM) {
149 $tpl =
new ilTemplate(
'tpl.appointment_presentation.html',
true,
true,
'components/ILIAS/Calendar');
154 #21529 create new toolbar with unique id using the entry id for this purpose 156 $toolbar->
setId((
string) $this->appointment[
'event']->getEntryId());
161 $content = $info_screen->
getHTML();
165 $content = $plugin_results[
'content'];
166 $toolbar = $plugin_results[
'toolbar'];
187 $this->list_item =
$f->getListItem();
195 $component_factory = $DIC[
'component.factory'];
196 return $component_factory->getActivePluginsInSlot(
"capm");
201 $content = $a_content;
202 $toolbar = $a_toolbar;
205 $plugin->setAppointment($this->appointment[
'event'],
new ilDateTime($this->appointment[
'dstart']));
206 if ($new_infoscreen = $plugin->infoscreenAddContent($this->info_screen)) {
207 $this->info_screen = $new_infoscreen;
209 $content = $this->info_screen->getHTML();
210 $extra_content = $plugin->addExtraContent();
211 if ($extra_content !=
'') {
212 $content .= $extra_content;
215 if ($new_content = $plugin->replaceContent()) {
216 $content = $new_content;
219 if ($new_toolbar = $plugin->toolbarAddItems($toolbar)) {
220 $toolbar = $new_toolbar;
223 if ($new_toolbar = $plugin->toolbarReplaceContent()) {
224 $new_toolbar->
setId((
string) $a_toolbar->getId());
225 $toolbar = $new_toolbar;
229 'content' => $content,
230 'toolbar' => $toolbar
static _getInstance(ilDate $seed, array $a_app)
get singleton instance
ilCalendarSettings $settings
RefineryFactory $refinery
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
ilGlobalTemplateInterface $tpl
getContentByPlugins($a_content, $a_toolbar)
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
static getInstance(array $a_appointment, ?ilInfoScreenGUI $a_info_screen, ?ilToolbarGUI $a_toolbar, ?Item $a_list_item)
setFormAction(string $a_form_action)
setVariable(string $variable, $value='')
Sets the given variable to the given value.
ilInfoScreenGUI $info_screen
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static http()
Fetches the global http state from ILIAS.
Common interface to all items.
Class ilCalendarAppointmentPresentationGUI.
modifyListItem()
Modify List item.
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
Administrate calendar appointments.
__construct(ilDate $seed, array $a_app)
setListItemMode(Item $a_val)
Set list item mode.