ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilConditionFactory.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2018 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
12 {
16  protected $cond_obj_adapter;
17 
22  {
23  if (is_null($cond_obj_adapter)) {
24  $this->cond_obj_adapter = new ilConditionObjectAdapter();
25  }
26  }
27 
34  public function repositoryTrigger($ref_id)
35  {
36  $obj_id = $this->cond_obj_adapter->getObjIdForRefId($ref_id);
37  $obj_type = $this->cond_obj_adapter->getTypeForObjId($obj_id);
38  return new ilConditionTrigger($ref_id, $obj_id, $obj_type);
39  }
40 
41 
48  public function set($conditions)
49  {
50  return new ilConditionSet($conditions);
51  }
52 
61  public function condition(ilConditionTrigger $trigger, $operator, $value = null)
62  {
63  return new ilCondition($trigger, $operator, $value);
64  }
65 
66 
72  public function operator()
73  {
74  return new ilConditionOperatorFactory();
75  }
76 }
Wraps ilObject dependencies.
__construct(ilConditionObjectAdapterInterface $cond_obj_adapter=null)
Constructor.
Condition class.
Represents a condition trigger object.
condition(ilConditionTrigger $trigger, $operator, $value=null)
Condition.
Currently wraps standard operator constants.
repositoryTrigger($ref_id)
Repository condition trigger object.
operator()
Standard operator factory.