ILIAS  Release_5_0_x_branch Revision 61816
 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';
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?
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  {
54  }
55 
56  public function getValidModes()
57  {
58  return array(
61  );
62  }
63 
64  public function getCurrentMode()
65  {
66  if($this->status !== null)
67  {
69  }
71  }
72 }
73 
74 ?>