3 declare(strict_types=1);
52 foreach ($sequence as
$index => $item) {
53 if ($item->getRefId() === (
int) $a_container_child_ref_id) {
60 $previous_item = $sequence[$pos - 1];
61 $post_conditions = array($previous_item->getPostCondition());
63 foreach ($post_conditions as $post_condition) {
64 $condition_op = $post_condition->getConditionOperator();
66 $conditions[] =
$f->condition(
67 $f->repositoryTrigger($previous_item->getRefId()),
69 $post_condition->getValue()
76 return $f->set($conditions);
81 return $this->
getDIC()->conditions()->factory();
99 return $dic[
'ilAccess'];
105 return (
int) $tree->getParentId($child_ref_id);
114 throw new LogicException(
"Object type should be ilObjLearningSequence. Actually is " . get_class($possible_object));
117 if (!$possible_object) {
118 throw new Exception(
'No object found for ref id ' . $container_ref_id .
'.');
121 return $possible_object;
129 $container = $this->getContainerObject($container_ref_id);
136 $may_edit = $il_access->checkAccess(
'edit_permission',
'', $container_ref_id);
137 return $may_edit ===
false;
Condition set Note: This object currently focuses on repository objects as targets.
const STD_ALWAYS_OPERATOR
getParentRefIdFor(int $child_ref_id)
getConditionSetForRepositoryObject(int $a_container_child_ref_id)
Returns condition set for a repository object which is children under a container that controls the c...
Interface for containers that take over control of conditions for repository object targets...
Customizing of pimple-DIC for ILIAS.
applyConditionsForCurrentUser(int $container_ref_id)
Handle Conditions within the LearningSequence Objects.
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
isContainerConditionController(int $a_container_ref_id)
Returns true, if the a container controls the conditions of its childrens.
getSequencedItems(int $container_ref_id)