ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
RedirectOnMissingWriteTrait.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\User;
22
24
25trait RedirectOnMissingWrite
26{
27 private function redirectOnMissingWrite(
28 \ilAccess $access,
29 \ilCtrl $ctrl,
31 Language $lng
32 ): void {
33 if (!$access->checkAccess(
34 'write',
35 '',
37 )) {
38 $tpl->setOnScreenMessage('failure', $lng->txt('permission_denied'), true);
39 $ctrl->redirectByClass(\ilRepositoryGUI::class);
40 }
41 }
42}
Class ilAccessHandler Checks access for ILIAS objects.
Class ilCtrl provides processing control methods.
redirectByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
@inheritDoc
const USER_FOLDER_ID
Definition: constants.php:33
setOnScreenMessage(string $type, string $a_txt, bool $a_keep=false)
Set a message to be displayed to the user.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: UserEvent.php:21
global $lng
Definition: privfeed.php:31
if(!file_exists('../ilias.ini.php'))