ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilPluginLP Class Reference
+ Inheritance diagram for ilPluginLP:
+ Collaboration diagram for ilPluginLP:

Public Member Functions

 getPluginInstance ()
 
 getDefaultMode ()
 
 getValidModes ()
 
 getCurrentMode ()
 
- Public Member Functions inherited from ilObjectLP
 resetCaches ()
 
 isAnonymized ()
 
 getDefaultMode ()
 
 getValidModes ()
 
 getCurrentMode ()
 
 isActive ()
 
 getModeText (int $mode)
 
 getModeInfoText (int $mode)
 
 getSettingsInfo ()
 
 getCollectionInstance ()
 
 getMembers (bool $search=true)
 
 resetLPDataForCompleteObject (bool $recursive=true)
 
 resetLPDataForUserIds (array $user_ids, bool $recursive=true)
 
 handleToTrash ()
 
 handleDelete ()
 
 getMailTemplateId ()
 
 hasIndividualModeOptions ()
 
 initInvidualModeOptions ()
 Post vars for input groups is taken from array keys. More...
 
 shouldFetchIndividualModeFromFormSubmission ()
 
 fetchIndividualModeFromFormSubmission (string $selected_group, array $group_data)
 
 appendModeConfiguration (int $mode)
 
 saveModeConfiguration (string $selected_group, array $group_data, bool &$modeChanged)
 

Data Fields

const INACTIVE_PLUGIN = -1
 

Protected Member Functions

 __construct ($a_obj_id)
 
 initPlugin ()
 
- Protected Member Functions inherited from ilObjectLP
 __construct (int $obj_id)
 
 resetCustomLPDataForUserIds (array $user_ids, bool $recursive=true)
 
 gatherLPUsers ()
 
 updateParentCollections ()
 

Static Protected Member Functions

static isLPMember (array &$res, int $usr_id, array $obj_ids)
 Find (lp-relevant) members for given object ids. More...
 
- Static Protected Member Functions inherited from ilObjectLP
static isLPMember (array &$res, int $usr_id, array $obj_ids)
 Find (lp-relevant) members for given object ids. More...
 
static findMembershipsByPath (array &$res, int $usr_id, int $parent_ref_id, array $obj_ids, bool $mapped_ref_ids=false)
 Find (lp-relevant) memberships by path. More...
 
static getTypeDefaultFromDB (string $type)
 

Protected Attributes

 $status
 
- Protected Attributes inherited from ilObjectLP
ilTree $tree
 
ilDBInterface $db
 
ilObjectDefinition $objectDefinition
 
int $obj_id
 
ilLPCollection $collection_instance = null
 
int $mode = null
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectLP
static getInstance (int $obj_id)
 
static getTypeClass (string $type)
 
static getSupportedObjectTypes ()
 
static isSupportedObjectType (string $type)
 
static handleMove (int $source_ref_id)
 
static getLPMemberships (int $usr_id, array $obj_ids, ?int $parent_ref_id=null, bool $mapped_ref_ids=false)
 Get all objects where given user is member (from LP POV) More...
 
static supportsSpentSeconds (string $obj_type)
 
static supportsMark (string $obj_type)
 
static supportsMatrixView (string $obj_type)
 
static getDefaultModes (bool $lp_active)
 Get available type-specific default modes (no administration needed) More...
 
static saveTypeDefaults (array $data)
 
static getTypeDefault (string $type)
 
- Static Protected Attributes inherited from ilObjectLP
static array $type_defaults = null
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilPluginLP::__construct (   $a_obj_id)
protected

Definition at line 32 of file class.ilPluginLP.php.

33 {
34 parent::__construct($a_obj_id);
35
36 $this->initPlugin();
37 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ILIAS\GlobalScreen\Provider\__construct(), and initPlugin().

+ Here is the call graph for this function:

Member Function Documentation

◆ getCurrentMode()

ilPluginLP::getCurrentMode ( )

Reimplemented from ilObjectLP.

Definition at line 72 of file class.ilPluginLP.php.

72 : int
73 {
74 if ($this->status !== null) {
76 }
78 }

References ilLPObjSettings\LP_MODE_PLUGIN, and ilLPObjSettings\LP_MODE_UNDEFINED.

◆ getDefaultMode()

ilPluginLP::getDefaultMode ( )

Reimplemented from ilObjectLP.

Definition at line 59 of file class.ilPluginLP.php.

59 : int
60 {
62 }

References ilLPObjSettings\LP_MODE_UNDEFINED.

◆ getPluginInstance()

ilPluginLP::getPluginInstance ( )

Definition at line 54 of file class.ilPluginLP.php.

55 {
56 return $this->status;
57 }

References $status.

◆ getValidModes()

ilPluginLP::getValidModes ( )
Returns
int[]

Reimplemented from ilObjectLP.

Definition at line 64 of file class.ilPluginLP.php.

64 : array
65 {
66 return array(
69 );
70 }

References ilLPObjSettings\LP_MODE_PLUGIN, and ilLPObjSettings\LP_MODE_UNDEFINED.

◆ initPlugin()

ilPluginLP::initPlugin ( )
protected

Definition at line 39 of file class.ilPluginLP.php.

39 : void
40 {
41 // active plugin?
43 $obj = ilObjectFactory::getInstanceByObjId($this->obj_id, false); // #12640
44 if ($obj instanceof ilLPStatusPluginInterface) {
45 $this->status = $obj;
46 }
47 }
48 // inactive plugin?
50 $this->status = self::INACTIVE_PLUGIN;
51 }
52 }
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
static _lookupType(int $id, bool $reference=false)
const INACTIVE_PLUGIN
static isTypePluginWithLP(string $a_type, bool $a_active_status=true)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ilObject\_lookupType(), ilObjectFactory\getInstanceByObjId(), INACTIVE_PLUGIN, and ilRepositoryObjectPluginSlot\isTypePluginWithLP().

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isLPMember()

static ilPluginLP::isLPMember ( array &  $res,
int  $usr_id,
array  $obj_ids 
)
staticprotected

Find (lp-relevant) members for given object ids.

Reimplemented from ilObjectLP.

Definition at line 80 of file class.ilPluginLP.php.

80 : bool
81 {
82 global $DIC;
83 $objDefinition = $DIC['objDefinition'];
84
85 $type = $obj_ids;
86 $type = array_shift($type);
87 $type = ilObject::_lookupType($type);
88
89 $location = $objDefinition->getLocation($type);
90 $class_name = "ilObj" . $objDefinition->getClassName($type);
91 include_once $location . "/class." . $class_name . ".php";
92
93 // forward to plugin object
94 if (method_exists($class_name, "isLPMember")) {
95 return $class_name::isLPMember($res, $usr_id, $obj_ids);
96 }
97
98 return false;
99 }
$location
Definition: buildRTE.php:22
$res
Definition: ltiservices.php:69
global $DIC
Definition: shib_login.php:26

References $DIC, $location, $res, and ilObject\_lookupType().

+ Here is the call graph for this function:

Field Documentation

◆ $status

ilPluginLP::$status
protected

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

Referenced by getPluginInstance().

◆ INACTIVE_PLUGIN


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