ILIAS
Release_4_4_x_branch Revision 61816
◀ ilDoc Overview
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Groups
Pages
class.ilPluginLP.php
Go to the documentation of this file.
1
<?php
2
3
/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5
include_once
"Services/Object/classes/class.ilObjectLP.php"
;
6
14
class
ilPluginLP
extends
ilObjectLP
15
{
16
protected
$status
;
// [mixed]
17
18
const
INACTIVE_PLUGIN
= -1;
19
20
protected
function
__construct
($a_obj_id)
21
{
22
parent::__construct
($a_obj_id);
23
24
$this->
initPlugin
();
25
}
26
27
protected
function
initPlugin
()
28
{
29
// active plugin?
30
include_once
'Services/Repository/classes/class.ilRepositoryObjectPluginSlot.php'
;
31
if
(
ilRepositoryObjectPluginSlot::isTypePluginWithLP
(
ilObject::_lookupType
($this->obj_id)))
32
{
33
$obj =
ilObjectFactory::getInstanceByObjId
($this->obj_id,
false
);
// #12640
34
if
($obj && $obj instanceof
ilLPStatusPluginInterface
)
35
{
36
$this->status = $obj;
37
}
38
}
39
// inactive plugin?
40
else
if
(
ilRepositoryObjectPluginSlot::isTypePluginWithLP
(
ilObject::_lookupType
($this->obj_id),
false
))
41
{
42
$this->status =
self::INACTIVE_PLUGIN
;
43
}
44
}
45
46
public
function
getPluginInstance
()
47
{
48
return
$this->status
;
49
}
50
51
public
function
getDefaultMode
()
52
{
53
return
ilLPObjSettings::LP_MODE_UNDEFINED
;
54
}
55
56
public
function
getValidModes
()
57
{
58
return
array(
59
ilLPObjSettings::LP_MODE_UNDEFINED
,
60
ilLPObjSettings::LP_MODE_PLUGIN
61
);
62
}
63
64
public
function
getCurrentMode
()
65
{
66
if
($this->status !== null)
67
{
68
return
ilLPObjSettings::LP_MODE_PLUGIN
;
69
}
70
return
ilLPObjSettings::LP_MODE_UNDEFINED
;
71
}
72
}
73
74
?>
Services
Component
classes
class.ilPluginLP.php
Generated on Wed Apr 27 2016 20:01:35 for ILIAS by
1.8.1.2 (using
Doxyfile
)