19declare(strict_types=1);
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;
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());
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;
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;
223 if ($new_toolbar =
$plugin->toolbarReplaceContent()) {
224 $new_toolbar->
setId((
string) $a_toolbar->getId());
229 'content' => $content,
static getInstance(array $a_appointment, ?ilInfoScreenGUI $a_info_screen, ?ilToolbarGUI $a_toolbar, ?Item $a_list_item)
Administrate calendar appointments.
Class ilCalendarAppointmentPresentationGUI.
ilCalendarSettings $settings
static _getInstance(ilDate $seed, array $a_app)
get singleton instance
getContentByPlugins($a_content, $a_toolbar)
ilGlobalTemplateInterface $tpl
RefineryFactory $refinery
__construct(ilDate $seed, array $a_app)
modifyListItem()
Modify List item.
ilInfoScreenGUI $info_screen
setListItemMode(Item $a_val)
Set list item mode.
Stores all calendar relevant settings.
@classDescription Date and time handling
setFormAction(string $a_form_action)
special template class to simplify handling of ITX/PEAR
setVariable(string $variable, $value='')
Sets the given variable to the given value.
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
Common interface to all items.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static http()
Fetches the global http state from ILIAS.