27 if (!$contextList->hasSets()) {
28 throw new ilException(
'Context does not exist! register context first using ilOrgUnitOperationContext::registerNewContext()');
33 $ilOrgUnitOperationContext = $contextList->first();
36 'context_id' => $ilOrgUnitOperationContext->getId(),
37 'operation_string' => $operation_name,
40 throw new ilException(
'This operation in this context has already been registered.');
43 $operation->setOperationString($operation_name);
44 $operation->setContextId($ilOrgUnitOperationContext->getId());
45 $operation->setDescription($description);
60 self::registerNewOperation($operation_name, $description,
$context);
70 public static function getOperationsForContextName($context_name)
87 public static function getOperationsForContextId($context_id)
static where($where, $operator=null)
static findOrFail($primary_key, array $add_constructor_args=array())
Tries to find the object and throws an Exception if object is not found, instead of returning null.
An exception for terminatinating execution or to throw for unit testing.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static findByName($context_name)
Class ilOrgUnitOperationQueries.
static findById($operation_id)
static registerNewOperationForMultipleContexts($operation_name, $description, array $contexts)
static findByOperationString($operation_string, $context_name)
Class ilOrgUnitOperation.