ILIAS  trunk Revision v11.0_alpha-1811-gd2d5443e411
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 24 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 69 of file class.ilOrgUnitOperationContextQueries.php.

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

◆ findByName()

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

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

References $context.

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

53  {
54  if (!isset(self::$instance_by_name[$context_name])) {
55  $context = self::getContextRepo()->find($context_name);
56  if (!$context) {
57  throw new ilException("Context not found");
58  }
59  self::$instance_by_name[$context_name] = $context;
60  }
61 
62  return self::$instance_by_name[$context_name];
63  }
$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 87 of file class.ilOrgUnitOperationContextQueries.php.

References ilObject\_lookupType().

88  {
89  $type_context = ilObject2::_lookupType($obj_id, false);
90 
91  return self::findByName($type_context);
92  }
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 77 of file class.ilOrgUnitOperationContextQueries.php.

References ilObject\_lookupType().

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

◆ getContextRepo()

static ilOrgUnitOperationContextQueries::getContextRepo ( )
staticprotected

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

References $dic, and ilOrgUnitLocalDIC\dic().

30  {
31  if (!isset(self::$contextRepo)) {
33  self::$contextRepo = $dic["repo.OperationContexts"];
34  }
35 
36  return self::$contextRepo;
37  }
$dic
Definition: result.php:31
+ 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 42 of file class.ilOrgUnitOperationContextQueries.php.

References $context.

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

Field Documentation

◆ $contextRepo

ilOrgUnitOperationContextDBRepository ilOrgUnitOperationContextQueries::$contextRepo
staticprotected

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

◆ $instance_by_name

array ilOrgUnitOperationContextQueries::$instance_by_name = array()
staticprotected

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


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