ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
class.ilOrgUnitOperationQueries.php
Go to the documentation of this file.
1 <?php
2 
26 {
28 
29  protected static function getOperationRepo()
30  {
31  if (!isset(self::$operationRepo)) {
33  self::$operationRepo = $dic["repo.Operations"];
34  }
35 
36  return self::$operationRepo;
37  }
38 
42  public static function registerNewOperation(
43  string $operation_name,
44  string $description,
46  ): void {
47  self::getOperationRepo()->get($operation_name, $description, [$context]);
48  }
49 
54  string $operation_name,
55  string $description,
56  array $contexts
57  ): void {
58  self::getOperationRepo()->get($operation_name, $description, $contexts);
59  }
60 
65  public static function getOperationsForContextName(string $context_name): array
66  {
67  return self::getOperationRepo()->getOperationsByContextName($context_name);
68  }
69 
74  public static function getOperationsForContextId(string $context_id): array
75  {
76  return self::getOperationRepo()->getOperationsByContextId($context_id);
77  }
78 
83  public static function findById(int $operation_id): ?ilOrgUnitOperation
84  {
85  return self::getOperationRepo()->getById($operation_id);
86  }
87 
91  public static function findByOperationString(
92  string $operation_string,
93  string $context_name
94  ): ?ilOrgUnitOperation {
95  return self::getOperationRepo()->find(
96  $operation_string,
97  $context_name
98  );
99  }
100 }
static findByOperationString(string $operation_string, string $context_name)
@deprecated Please use find() from OrgUnitOperationRepository
$context
Definition: webdav.php:31
static getOperationsForContextName(string $context_name)
static registerNewOperationForMultipleContexts(string $operation_name, string $description, array $contexts)
static ilOrgUnitOperationDBRepository $operationRepo
static registerNewOperation(string $operation_name, string $description, string $context=ilOrgUnitOperationContext::CONTEXT_OBJECT)
static getOperationsForContextId(string $context_id)
static findById(int $operation_id)
@deprecated Please use get() from OrgUnitOperationRepository for operation name Operations should not...
$dic
Definition: ltiresult.php:33