3declare(strict_types=1);
 
   59        $container->language()->loadLanguageModule(
'etal');
 
   60        $container->language()->loadLanguageModule(
'orgu');
 
   64        $this->
access = ilMyStaffAccess::getInstance();
 
   76        $nextClass = $this->controlFlow->getNextClass();
 
   77        $command = $this->controlFlow->getCmd(ControlFlowCommand::DEFAULT);
 
   79            case strtolower(ilObjEmployeeTalkSeriesGUI::class):
 
   81                $this->controlFlow->forwardCommand($gui);
 
   83            case strtolower(ilObjEmployeeTalkGUI::class):
 
   85                if ($this->
access->hasCurrentUserAccessToTalks()) {
 
   86                    $this->
tabs->setBackTarget(
 
   88                        $this->controlFlow->getLinkTarget($this, ControlFlowCommand::INDEX)
 
   91                $this->controlFlow->forwardCommand($gui);
 
   93            case strtolower(ilFormPropertyDispatchGUI::class):
 
   94                $this->controlFlow->setReturn($this, ControlFlowCommand::INDEX);
 
   96                $table->executeCommand();
 
  100                    case ControlFlowCommand::APPLY_FILTER:
 
  103                    case ControlFlowCommand::RESET_FILTER:
 
  106                    case ControlFlowCommand::TABLE_ACTIONS:
 
  120        $class = strtolower(ilObjEmployeeTalkGUI::class);
 
  122            strtolower(ilDashboardGUI::class),
 
  123            strtolower(ilMyStaffGUI::class),
 
  124            strtolower(ilEmployeeTalkMyStaffListGUI::class),
 
  128        $queryParams = $this->
http->request()->getQueryParams();
 
  129        if (!key_exists(
'ref_id', $queryParams)) {
 
  130            echo $listGUI->getHTML(
true);
 
  137            ->retrieve(
'ref_id', $this->
refinery->kindlyTo()->int());
 
  138        $this->controlFlow->setParameterByClass($class, 
"ref_id", 
$refId);
 
  139        if ($this->talkAccess->canEdit(
$refId)) {
 
  140            $listGUI->addItem($this->
language->txt(
'edit'), 
'', $this->controlFlow->getLinkTargetByClass($classPath, ControlFlowCommand::UPDATE));
 
  142            $listGUI->addItem($this->
language->txt(
'view'), 
'', $this->controlFlow->getLinkTargetByClass($classPath, ControlFlowCommand::INDEX));
 
  145        if ($this->talkAccess->canDelete(
$refId)) {
 
  146            $this->controlFlow->setParameterByClass($class, 
"item_ref_id", 
$refId);
 
  147            $listGUI->addItem($this->
language->txt(
'delete'), 
'', $this->controlFlow->getLinkTargetByClass($classPath, ControlFlowCommand::DELETE_INDEX));
 
  150        echo $listGUI->getHTML(
true);
 
  157        $table->writeFilterToSession();
 
  158        $table->resetOffset();
 
  165        $table->resetOffset();
 
  166        $table->resetFilter();
 
  174        $this->
ui->mainTemplate()->setTitle($this->
language->txt(
'mm_org_etal'));
 
  176        $this->
ui->mainTemplate()->setContent($this->loadTable()->getHTML());
 
  182        $this->
tabs->addTab(
"view_content", 
"Content", 
"#");
 
  183        $this->
tabs->activateTab(
"view_content");
 
  185        $this->
tabs->setForcePresentationOfSingleTab(
true);
 
  196        $gl->setAsDropDown(
true, 
false);
 
  198        $templates = 
new CallbackFilterIterator(
 
  200            function (array $item) {
 
  203                        $item[
'offline'] === 
"0" ||
 
  204                        $item[
'offline'] === 
null 
  209        foreach ($templates as $item) {
 
  210            $type = $item[
"type"];
 
  212            $objId = intval($item[
'obj_id']);
 
  214            $icon = (
$path != 
"")
 
  218            $url = $this->controlFlow->getLinkTargetByClass(strtolower(ilObjEmployeeTalkSeriesGUI::class), ControlFlowCommand::CREATE);
 
  229                $icon . $item[
"title"],
 
  243        $adv->setListTitle($this->
language->txt(
"etal_add_new_item"));
 
  245        $adv->setGroupedList($gl);
 
  248        $this->
ui->mainTemplate()->setVariable(
"SELECT_OBJTYPE_REPOS", $adv->getHTML());
 
  259        if ($this->currentUser->getId() === 6) {
 
  262            $users = $this->getEmployeeIdsWithValidPermissionRights($this->currentUser->getId());
 
  263            $talks = $this->
repository->findByUserOrTheirEmployees($this->currentUser->getId(), $users);
 
  265        $table->setTalkData($talks);
 
  270    private function getEmployeeIdsWithValidPermissionRights(
int $userId): array
 
  272        $myStaffAccess = ilMyStaffAccess::getInstance();
 
  274        $managedUsers = [$userId];
 
  279        $managedOrgUnitUsersOfUserByPosition = $myStaffAccess->getUsersForUserPerPosition($userId);
 
  281        foreach ($managedOrgUnitUsersOfUserByPosition as $position => $managedOrgUnitUserByPosition) {
 
  288            if (!$isAbleToExecuteOperation) {
 
  292            foreach ($managedOrgUnitUserByPosition as $managedOrgUnitUser) {
 
  293                $managedUsers[] = intval($managedOrgUnitUser);
 
  297        $managedUsers = array_unique($managedUsers, SORT_NUMERIC);
 
  299        return $managedUsers;
 
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
 
static return function(ContainerConfigurator $containerConfigurator)
 
Provides fluid interface to RBAC services.
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
Class ilCtrl provides processing control methods.
 
Class ilEmployeeTalkMyStaffListGUI.
 
EmployeeTalkRepository $repository
 
ilObjEmployeeTalkAccess $talkAccess
 
ILIAS Refinery Factory $refinery
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static getObjCreationTooltipText(string $a_type)
Get object_creation tooltip tab text.
 
canCreate(?ilObjUser $talkParticipant=null)
Checks if the user is allowed to create a new talks series.
 
Class ilObjEmployeeTalkGUI.
 
Class ilObjEmployeeTalkGUI.
 
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
 
static _getObjectsByType(string $obj_type="", int $owner=null)
 
static _hasUntrashedReference(int $obj_id)
checks whether an object has at least one reference that is not in trash
 
static _getAllReferences(int $id)
get all reference ids for object ID
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static getTemplateSetForContextName(string $context_name, string $position_id, bool $editable=false)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
 
static img(string $a_src, ?string $a_alt=null, $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
 
static http()
Fetches the global http state from ILIAS.
 
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc