ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilOrgUnitOperationQueries.php
Go to the documentation of this file.
1<?php
2
25{
27
28 protected static function getOperationRepo()
29 {
30 if (!isset(self::$operationRepo)) {
32 self::$operationRepo = $dic["repo.Operations"];
33 }
34
36 }
37
41 public static function registerNewOperation(
42 string $operation_name,
43 string $description,
45 ): void {
46 self::getOperationRepo()->get($operation_name, $description, [$context]);
47 }
48
53 string $operation_name,
54 string $description,
55 array $contexts
56 ): void {
57 self::getOperationRepo()->get($operation_name, $description, $contexts);
58 }
59
64 public static function getOperationsForContextName(string $context_name): array
65 {
66 return self::getOperationRepo()->getOperationsByContextName($context_name);
67 }
68
73 public static function getOperationsForContextId(string $context_id): array
74 {
75 return self::getOperationRepo()->getOperationsByContextId($context_id);
76 }
77
82 public static function findById(int $operation_id): ?ilOrgUnitOperation
83 {
84 return self::getOperationRepo()->getById($operation_id);
85 }
86
90 public static function findByOperationString(
91 string $operation_string,
92 string $context_name
94 return self::getOperationRepo()->find(
95 $operation_string,
96 $context_name
97 );
98 }
99}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static registerNewOperationForMultipleContexts(string $operation_name, string $description, array $contexts)
static registerNewOperation(string $operation_name, string $description, string $context=ilOrgUnitOperationContext::CONTEXT_OBJECT)
static findByOperationString(string $operation_string, string $context_name)
@deprecated Please use find() from OrgUnitOperationRepository
static ilOrgUnitOperationDBRepository $operationRepo
static getOperationsForContextId(string $context_id)
static findById(int $operation_id)
@deprecated Please use get() from OrgUnitOperationRepository for operation name Operations should not...
static getOperationsForContextName(string $context_name)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$dic
Definition: ltiresult.php:33
get(string $class_name)
$context
Definition: webdav.php:31