ILIAS  release_7 Revision v7.30-3-g800a261c036
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 ($a_mode)
 
 getModeInfoText ($a_mode)
 
 getSettingsInfo ()
 
 getCollectionInstance ()
 
 getMembers ($a_search=true)
 
 resetLPDataForCompleteObject ($a_recursive=true)
 
 resetLPDataForUserIds (array $a_user_ids, $a_recursive=true)
 
 handleToTrash ()
 
 handleDelete ()
 
 getMailTemplateId ()
 

Data Fields

const INACTIVE_PLUGIN = -1
 

Protected Member Functions

 __construct ($a_obj_id)
 
 initPlugin ()
 
- Protected Member Functions inherited from ilObjectLP
 __construct ($a_obj_id)
 
 resetCustomLPDataForUserIds (array $a_user_ids, $a_recursive=true)
 
 gatherLPUsers ()
 
 updateParentCollections ()
 

Static Protected Member Functions

static isLPMember (array &$a_res, $a_usr_id, $a_obj_ids)
 Find (lp-relevant) members for given object ids. More...
 
- Static Protected Member Functions inherited from ilObjectLP
static isLPMember (array &$a_res, $a_usr_id, $a_obj_ids)
 Find (lp-relevant) members for given object ids. More...
 
static findMembershipsByPath (array &$a_res, $a_usr_id, $a_parent_ref_id, array $a_obj_ids, $a_mapped_ref_ids=false)
 Find (lp-relevant) memberships by path. More...
 
static getTypeDefaultFromDB ($a_type)
 

Protected Attributes

 $status
 
- Protected Attributes inherited from ilObjectLP
 $tree
 
 $db
 
 $obj_id
 
 $collection_instance
 
 $mode
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectLP
static getInstance ($a_obj_id)
 
static getTypeClass ($a_type)
 
static getSupportedObjectTypes ()
 
static isSupportedObjectType ($type)
 
static handleMove ($a_source_ref_id)
 
static getLPMemberships ($a_usr_id, array $a_obj_ids, $a_parent_ref_id=null, $a_mapped_ref_ids=false)
 Get all objects where given user is member (from LP POV) More...
 
static supportsSpentSeconds ($a_obj_type)
 
static supportsMark ($a_obj_type)
 
static supportsMatrixView ($a_obj_type)
 
static getDefaultModes ($a_lp_active)
 Get available type-specific default modes (no administration needed) More...
 
static saveTypeDefaults (array $a_data)
 
static getTypeDefault ($a_type)
 Get current type default. More...
 
- Static Protected Attributes inherited from ilObjectLP
static $type_defaults
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilPluginLP::__construct (   $a_obj_id)
protected

Reimplemented from ilObjectLP.

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

21 {
22 parent::__construct($a_obj_id);
23
24 $this->initPlugin();
25 }
__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 61 of file class.ilPluginLP.php.

62 {
63 if ($this->status !== null) {
65 }
67 }

References ilLPObjSettings\LP_MODE_PLUGIN, and ilLPObjSettings\LP_MODE_UNDEFINED.

◆ getDefaultMode()

ilPluginLP::getDefaultMode ( )

Reimplemented from ilObjectLP.

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

49 {
51 }

References ilLPObjSettings\LP_MODE_UNDEFINED.

◆ getPluginInstance()

ilPluginLP::getPluginInstance ( )

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

44 {
45 return $this->status;
46 }

References $status.

◆ getValidModes()

ilPluginLP::getValidModes ( )

Reimplemented from ilObjectLP.

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

References ilLPObjSettings\LP_MODE_PLUGIN, and ilLPObjSettings\LP_MODE_UNDEFINED.

◆ initPlugin()

ilPluginLP::initPlugin ( )
protected

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

28 {
29 // active plugin?
30 include_once 'Services/Repository/classes/class.ilRepositoryObjectPluginSlot.php';
32 $obj = ilObjectFactory::getInstanceByObjId($this->obj_id, false); // #12640
33 if ($obj && $obj instanceof ilLPStatusPluginInterface) {
34 $this->status = $obj;
35 }
36 }
37 // inactive plugin?
39 $this->status = self::INACTIVE_PLUGIN;
40 }
41 }
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static _lookupType($a_id, $a_reference=false)
lookup object type
const INACTIVE_PLUGIN
static isTypePluginWithLP($a_type, $a_active_status=true)
Check whether a repository type is a plugin which has active learning progress.
Interface for plugin classes that want to support Learning Progress.

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 &  $a_res,
  $a_usr_id,
  $a_obj_ids 
)
staticprotected

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

Parameters
array$a_res
int$a_usr_id
array$a_obj_ids

Reimplemented from ilObjectLP.

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

70 {
71 global $DIC;
72 $objDefinition = $DIC['objDefinition'];
73
74 $type = $a_obj_ids;
75 $type = array_shift($type);
77
78 $location = $objDefinition->getLocation($type);
79 $class_name = "ilObj" . $objDefinition->getClassName($type);
80 include_once $location . "/class." . $class_name . ".php";
81
82 // forward to plugin object
83 if (method_exists($class_name, "isLPMember")) {
84 $class_name::isLPMember($a_res, $a_usr_id, $a_obj_ids);
85 }
86 }
$location
Definition: buildRTE.php:44
global $DIC
Definition: goto.php:24
$type

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

+ Here is the call graph for this function:

Field Documentation

◆ $status

ilPluginLP::$status
protected

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

Referenced by getPluginInstance().

◆ INACTIVE_PLUGIN


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