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,
39 throw new ilException(
'This operation in this context has already been registered.');
42 $operation->setOperationString($operation_name);
43 $operation->setContextId($ilOrgUnitOperationContext->getId());
59 self::registerNewOperation($operation_name,
$description, $context);
69 public static function getOperationsForContextName($context_name)
86 public static function getOperationsForContextId($context_id)
static findById($operation_id)
static registerNewOperationForMultipleContexts($operation_name, $description, array $contexts)
Class ilOrgUnitOperationQueries.
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...
static findByName($context_name)
Class ilOrgUnitOperation.
static findByOperationString($operation_string, $context_name)