ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilPageComponentPlugin.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
5 include_once("./Services/Component/classes/class.ilPlugin.php");
6 
15 abstract class ilPageComponentPlugin extends ilPlugin
16 {
17  const TXT_CMD_INSERT = "cmd_insert";
18  const CMD_INSERT = "insert";
19  const CMD_EDIT = "edit";
20 
26  final function getComponentType()
27  {
28  return IL_COMP_SERVICE;
29  }
30 
36  final function getComponentName()
37  {
38  return "COPage";
39  }
40 
46  final function getSlot()
47  {
48  return "PageComponent";
49  }
50 
56  final function getSlotId()
57  {
58  return "pgcp";
59  }
60 
64  protected final function slotInit()
65  {
66  // nothing to do here
67  }
68 
77  abstract function isValidParentType($a_type);
78 
82  function getJavascriptFiles($a_mode)
83  {
84  return array();
85  }
86 
90  function getCssFiles($a_mode)
91  {
92  return array();
93  }
94 
100  final function setMode($a_mode)
101  {
102  $this->mode = $a_mode;
103  }
104 
110  final function getMode()
111  {
112  return $this->mode;
113  }
114 
119  {
120  $class = "il".$this->getPluginName()."PluginGUI";
121  $this->includeClass("class.".$class.".php");
122  $obj = new $class();
123  $obj->setPlugin($this);
124  return $obj;
125  }
126 
127 }
128 ?>
getComponentName()
Get Component Name.
includeClass($a_class_file_name)
Include (once) a class file.
getComponentType()
Get Component Type.
slotInit()
Object initialization done by slot.
$a_type
Definition: workflow.php:93
getJavascriptFiles($a_mode)
Get Javascript files.
getUIClassInstance()
Get UI plugin class.
Abstract parent class for all page component plugin classes.
Create styles array
The data for the language used.
getCssFiles($a_mode)
Get css files.
const IL_COMP_SERVICE
isValidParentType($a_type)
Determines the resources that allow to include the new content component.