ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilObjContentPageAccess.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22{
23 public static function _getCommands(): array
24 {
25 $commands = [
26 [
27 'permission' => 'read',
28 'cmd' => self::UI_CMD_VIEW,
29 'lang_var' => 'show',
30 'default' => true
31 ],
32 [
33 'permission' => 'write',
34 'cmd' => 'edit',
35 'lang_var' => 'settings'
36 ],
37 ];
38
39 return $commands;
40 }
41
42 public static function _checkGoto(string $target): bool
43 {
44 $targetAttributes = explode('_', $target);
45
46 if (2 !== count($targetAttributes) || $targetAttributes[0] !== self::OBJ_TYPE || ((int) $targetAttributes[1]) <= 0) {
47 return false;
48 }
49
50 return parent::_checkGoto($target);
51 }
52
53 public static function getConditionOperators(): array
54 {
55 return [];
56 }
57
58 public static function checkCondition(int $a_trigger_obj_id, string $a_operator, string $a_value, int $a_usr_id): bool
59 {
60 return false;
61 }
62}
return true
static checkCondition(int $a_trigger_obj_id, string $a_operator, string $a_value, int $a_usr_id)
check condition for a specific user and object
static _checkGoto(string $target)
check whether goto script will succeed
static getConditionOperators()
Returns an array with valid operators for the specific object type.
Class ilObjectAccess.
Interface for condition handling.
Interface ilContentPageObjectConstants.