19 declare(strict_types=1);
44 $DIC->language()->loadLanguageModule(
'etal');
45 $DIC->language()->loadLanguageModule(
'orgu');
48 $this->
access = ilMyStaffAccess::getInstance();
50 $this->
tabs = $DIC->tabs();
51 $this->
ui = $DIC->ui();
52 $this->
ctrl = $DIC->ctrl();
53 $this->current_user = $DIC->user();
59 $next_class = $this->
ctrl->getNextClass();
60 $command = $this->
ctrl->getCmd(ControlFlowCommand::DEFAULT);
63 switch ($next_class) {
64 case strtolower(ilObjEmployeeTalkSeriesGUI::class):
66 $gui->setLinkToParentGUI($link_to_this);
67 $this->
ctrl->forwardCommand($gui);
69 case strtolower(ilObjEmployeeTalkGUI::class):
71 if ($this->
access->hasCurrentUserAccessToTalks()) {
72 $this->
tabs->setBackTarget(
74 $this->
ctrl->getLinkTarget($this, ControlFlowCommand::INDEX)
77 $gui->setLinkToParentGUI($link_to_this);
78 $this->
ctrl->forwardCommand($gui);
80 case strtolower(ilFormPropertyDispatchGUI::class):
81 $this->
ctrl->setReturn($this, ControlFlowCommand::INDEX);
83 $table->executeCommand();
87 case ControlFlowCommand::APPLY_FILTER:
90 case ControlFlowCommand::RESET_FILTER:
93 case ControlFlowCommand::INDEX:
105 $this->
ui->mainTemplate()->setOnScreenMessage(
107 $this->
language->txt(
"permission_denied"),
110 $this->
ctrl->redirectByClass(ilDashboardGUI::class,
"");
122 $table->writeFilterToSession();
123 $table->resetOffset();
130 $table->resetOffset();
131 $table->resetFilter();
140 $this->
ui->mainTemplate()->setContent($this->
loadTable()->getHTML());
143 abstract protected function loadHeader(): void;
145 abstract protected function loadTabs(): void;
149 if (!$this->talk_access->canCreate()) {
153 $templates =
new CallbackFilterIterator(
155 function (array $item) {
158 $item[
'offline'] ===
"0" ||
159 $item[
'offline'] === 0 ||
160 $item[
'offline'] ===
null 166 $talk_class = strtolower(ilObjEmployeeTalkSeriesGUI::class);
167 foreach ($templates as $item) {
168 $objId = intval($item[
'obj_id']);
173 $this->
ctrl->setParameterByClass($talk_class,
'template', array_pop(
$refId));
175 $url = $this->
ctrl->getLinkTargetByClass($talk_class, ControlFlowCommand::CREATE);
176 $this->
ctrl->clearParametersByClass($talk_class);
178 $buttons[] = $this->
ui->factory()->link()->standard(
179 (
string) $item[
"title"],
184 $dropdown = $this->
ui->factory()->dropdown()->standard($buttons)->withLabel(
185 $this->
language->txt(
'etal_add_new_item')
187 $this->
ui->mainTemplate()->setVariable(
188 'SELECT_OBJTYPE_REPOS',
189 $this->
ui->renderer()->render($dropdown)
static _getObjectsByType(string $obj_type="", ?int $owner=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
EmployeeTalkRepository $repository
static _getAllReferences(int $id)
get all reference ids for object ID
repository()
description: > Example for rendering a repository card
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _hasUntrashedReference(int $obj_id)
checks whether an object has at least one reference that is not in trash
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Provides fluid interface to RBAC services.
Class ilObjEmployeeTalkGUI.
language()
description: > Example for rendring a language glyph.
ilObjEmployeeTalkAccess $talk_access
Class ilObjEmployeeTalkGUI.