ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $id, and getContextRepo().

+ Here is the call graph for this function:

◆ 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.

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 }
Base class for ILIAS Exception handling.
$context
Definition: webdav.php:31

References $context, and getContextRepo().

Referenced by findByObjId(), and findByRefId().

+ Here is the call graph for this function:
+ 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.

88 {
89 $type_context = ilObject2::_lookupType($obj_id, false);
90
91 return self::findByName($type_context);
92 }
static _lookupType(int $id, bool $reference=false)

References ilObject\_lookupType(), and findByName().

+ 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.

78 {
79 $type_context = ilObject2::_lookupType($ref_id, true);
80
81 return self::findByName($type_context);
82 }
$ref_id
Definition: ltiauth.php:66

References $ref_id, ilObject\_lookupType(), and findByName().

+ Here is the call graph for this function:

◆ getContextRepo()

static ilOrgUnitOperationContextQueries::getContextRepo ( )
staticprotected

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

30 {
31 if (!isset(self::$contextRepo)) {
33 self::$contextRepo = $dic["repo.OperationContexts"];
34 }
35
36 return self::$contextRepo;
37 }
static ilOrgUnitOperationContextDBRepository $contextRepo
$dic
Definition: ltiresult.php:33

References $contextRepo, $dic, and ilOrgUnitLocalDIC\dic().

Referenced by findById(), findByName(), and registerNewContext().

+ Here is the call graph for this function:
+ Here is the caller 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.

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

References $context, and getContextRepo().

+ Here is the call graph for this function:

Field Documentation

◆ $contextRepo

ilOrgUnitOperationContextDBRepository ilOrgUnitOperationContextQueries::$contextRepo
staticprotected

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

Referenced by getContextRepo().

◆ $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: