ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
ilOrgUnitOperationContextQueries Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilOrgUnitOperationContextQueries:

Static Public Member Functions

static registerNewContext (string $context_name, ?string $parent_context=null)
 
static findByName (string $context_name)
 
static findById (int $id)
 
static findByRefId (int $ref_id)
 
static findByObjId (int $obj_id)
 

Static Protected Member Functions

static getContextRepo ()
 

Static Protected Attributes

static array $instance_by_name = array()
 
static ilOrgUnitOperationContextDBRepository $contextRepo
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class ilOrgUnitOperationContextQueries

Author
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
Deprecated:
Please use OrgUnitOperationContextRepository

Definition at line 25 of file class.ilOrgUnitOperationContextQueries.php.

Member Function Documentation

◆ findById()

static ilOrgUnitOperationContextQueries::findById ( int  $id)
static
Deprecated:
Please use find() from OrgUnitOperationContextRepository for context name Contexts should not be referenced by Id

Definition at line 70 of file class.ilOrgUnitOperationContextQueries.php.

71  {
72  return self::getContextRepo()->getById($id);
73  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:24

◆ findByName()

static ilOrgUnitOperationContextQueries::findByName ( string  $context_name)
static
Deprecated:
Please use find() from OrgUnitOperationContextRepository
Exceptions
ilException

Definition at line 53 of file class.ilOrgUnitOperationContextQueries.php.

References $context.

Referenced by ILIAS\MyStaff\ilMyStaffAccess\getIdsForPositionAndOperation().

54  {
55  if (!isset(self::$instance_by_name[$context_name])) {
56  $context = self::getContextRepo()->find($context_name);
57  if (!$context) {
58  throw new ilException("Context not found");
59  }
60  self::$instance_by_name[$context_name] = $context;
61  }
62 
63  return self::$instance_by_name[$context_name];
64  }
$context
Definition: webdav.php:31
+ Here is the caller graph for this function:

◆ findByObjId()

static ilOrgUnitOperationContextQueries::findByObjId ( int  $obj_id)
static
Deprecated:
Please use getByObjId() from OrgUnitOperationContextRepository

Definition at line 88 of file class.ilOrgUnitOperationContextQueries.php.

References ilObject\_lookupType().

89  {
90  $type_context = ilObject2::_lookupType($obj_id, false);
91 
92  return self::findByName($type_context);
93  }
static _lookupType(int $id, bool $reference=false)
+ Here is the call graph for this function:

◆ findByRefId()

static ilOrgUnitOperationContextQueries::findByRefId ( int  $ref_id)
static
Deprecated:
Please use getByRefId() from OrgUnitOperationContextRepository

Definition at line 78 of file class.ilOrgUnitOperationContextQueries.php.

References ilObject\_lookupType().

79  {
80  $type_context = ilObject2::_lookupType($ref_id, true);
81 
82  return self::findByName($type_context);
83  }
$ref_id
Definition: ltiauth.php:66
static _lookupType(int $id, bool $reference=false)
+ Here is the call graph for this function:

◆ getContextRepo()

static ilOrgUnitOperationContextQueries::getContextRepo ( )
staticprotected

Definition at line 30 of file class.ilOrgUnitOperationContextQueries.php.

References $dic, and ilOrgUnitLocalDIC\dic().

31  {
32  if (!isset(self::$contextRepo)) {
34  self::$contextRepo = $dic["repo.OperationContexts"];
35  }
36 
37  return self::$contextRepo;
38  }
$dic
Definition: ltiresult.php:33
+ Here is the call graph for this function:

◆ registerNewContext()

static ilOrgUnitOperationContextQueries::registerNewContext ( string  $context_name,
?string  $parent_context = null 
)
static
Deprecated:
Please use get() from OrgUnitOperationContextRepository

Definition at line 43 of file class.ilOrgUnitOperationContextQueries.php.

References $context.

43  : void
44  {
45  $context = self::getContextRepo()->get($context_name, $parent_context);
46  }
$context
Definition: webdav.php:31

Field Documentation

◆ $contextRepo

ilOrgUnitOperationContextDBRepository ilOrgUnitOperationContextQueries::$contextRepo
staticprotected

Definition at line 28 of file class.ilOrgUnitOperationContextQueries.php.

◆ $instance_by_name

array ilOrgUnitOperationContextQueries::$instance_by_name = array()
staticprotected

Definition at line 27 of file class.ilOrgUnitOperationContextQueries.php.


The documentation for this class was generated from the following file: