ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilPageComponentPlugin Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilPageComponentPlugin:
+ Collaboration diagram for ilPageComponentPlugin:

Public Member Functions

 isValidParentType (string $a_type)
 Determines the parent types that allow to include the new content component. More...
 
 getJavascriptFiles (string $a_mode)
 
 getCssFiles (string $a_mode)
 
 setMode (string $a_mode)
 
 getMode ()
 
 getUIClassInstance ()
 Get UI plugin class. More...
 
 setPageObj (ilPageObject $a_page_obj)
 Inject the page object This must be public to be called by ilPCPlugged But the page object should not directly be accessible by plugins. More...
 
 getPageId ()
 Get the id of the page. More...
 
 getParentId ()
 Get the object id of the parent object. More...
 
 getParentType ()
 Get the object type og the parent object. More...
 
 onClone (array &$a_properties, string $a_plugin_version)
 This function is called when the page content is cloned. More...
 
 afterRepositoryCopy (array &$a_properties, array $mapping, int $source_ref_id, string $a_plugin_version)
 This function is called after repository (container) objects have been copied. More...
 
 onDelete (array $a_properties, string $a_plugin_version, bool $move_operation=false)
 This function is called before the page content is deleted. More...
 
- Public Member Functions inherited from ilPlugin
 getMessage ()
 
 __construct (\ilDBInterface $db, \ilComponentRepositoryWrite $component_repository, string $id)
 
 getPluginName ()
 
 getId ()
 
 getVersion ()
 Only very little classes seem to care about this: More...
 
 getDirectory ()
 Only very little classes seem to care about this: More...
 
 isActive ()
 Only very little classes seem to care about this: More...
 
 needsUpdate ()
 
 install ()
 
 uninstall ()
 
 activate ()
 This will update (if required) and activate the plugin. More...
 
 deactivate ()
 
 update ()
 
 loadLanguageModule ()
 Load language module for plugin. More...
 
 txt (string $a_var)
 Get Language Variable (prefix will be prepended automatically) More...
 
 getTemplate (string $a_template, bool $a_par1=true, bool $a_par2=true)
 ILIAS is moving towards UI components and plugins are expected to use these components. More...
 
 getStyleSheetLocation (string $a_css_file)
 ILIAS is moving towards UI components and plugins are expected to use these components. More...
 
 addBlockFile ($a_tpl, $a_var, $a_block, $a_tplname)
 ILIAS is moving towards UI components and plugins are expected to use these components. More...
 
 getGlobalScreenProviderCollection ()
 
 exchangeUIRendererAfterInitialization (\ILIAS\DI\Container $dic)
 This methods allows to replace the UI Renderer (see src/UI) of ILIAS after initialization by returning a closure returning a custom renderer. More...
 
 exchangeUIFactoryAfterInitialization (string $dic_key, \ILIAS\DI\Container $dic)
 This methods allows to replace some factory for UI Components (see src/UI) of ILIAS after initialization by returning a closure returning a custom factory. More...
 

Data Fields

const TXT_CMD_INSERT = "cmd_insert"
 
const CMD_INSERT = "insert"
 
const CMD_EDIT = "edit"
 

Protected Attributes

string $mode
 
- Protected Attributes inherited from ilPlugin
ilDBInterface $db
 
ilComponentRepositoryWrite $component_repository
 
string $id
 
ilPluginLanguage $language_handler = null
 
bool $lang_initialised = false
 
ProviderCollection $provider_collection
 
string $message = ''
 

Private Attributes

ilPageObject $page_obj = null
 

Additional Inherited Members

- Protected Member Functions inherited from ilPlugin
 init ()
 Object initialization. More...
 
 getPluginInfo ()
 
 getComponentInfo ()
 
 getPluginSlotInfo ()
 
 afterInstall ()
 If you cannot get rid of the requirement to use this, adjust the install method in your subclass instead. More...
 
 beforeUninstall ()
 If you cannot get rid of the requirement to use this, adjust the uninstall method in your subclass instead. More...
 
 afterUninstall ()
 If you cannot get rid of the requirement to use this, adjust the uninstall method in your subclass instead. More...
 
 beforeActivation ()
 If you cannot get rid of the requirement to use this, adjust the activate method in your subclass instead. More...
 
 afterActivation ()
 If you cannot get rid of the requirement to use this, adjust the activate method in your subclass instead. More...
 
 afterDeactivation ()
 If you cannot get rid of the requirement to use this, adjust the activate method in your subclass instead. More...
 
 updateDatabase ()
 
 beforeUpdate ()
 If you cannot get rid of the requirement to use this, adjust the update method in your subclass instead. More...
 
 afterUpdate ()
 
 getLanguageHandler ()
 
 buildLanguageHandler ()
 
 readEventListening ()
 
 clearEventListening ()
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Abstract parent class for all page component plugin classes.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 24 of file class.ilPageComponentPlugin.php.

Member Function Documentation

◆ afterRepositoryCopy()

ilPageComponentPlugin::afterRepositoryCopy ( array &  $a_properties,
array  $mapping,
int  $source_ref_id,
string  $a_plugin_version 
)

This function is called after repository (container) objects have been copied.

Parameters
array$a_propertiesproperties saved in the page, should be modified if neccessary
array$mappingrepository object mapping array
int$source_ref_idref id of source object
string$a_plugin_versionplugin version of the properties

Definition at line 134 of file class.ilPageComponentPlugin.php.

139  : void {
140  }

◆ getCssFiles()

ilPageComponentPlugin::getCssFiles ( string  $a_mode)

Definition at line 46 of file class.ilPageComponentPlugin.php.

46  : array
47  {
48  return array();
49  }

◆ getJavascriptFiles()

ilPageComponentPlugin::getJavascriptFiles ( string  $a_mode)

Definition at line 41 of file class.ilPageComponentPlugin.php.

41  : array
42  {
43  return array();
44  }

◆ getMode()

ilPageComponentPlugin::getMode ( )
final

Definition at line 56 of file class.ilPageComponentPlugin.php.

References $mode.

56  : string
57  {
58  return $this->mode;
59  }

◆ getPageId()

ilPageComponentPlugin::getPageId ( )

Get the id of the page.

Definition at line 85 of file class.ilPageComponentPlugin.php.

85  : int
86  {
87  if (isset($this->page_obj)) {
88  return $this->page_obj->getId();
89  }
90  return 0;
91  }

◆ getParentId()

ilPageComponentPlugin::getParentId ( )

Get the object id of the parent object.

Definition at line 96 of file class.ilPageComponentPlugin.php.

96  : int
97  {
98  if (isset($this->page_obj)) {
99  return $this->page_obj->getParentId();
100  }
101  return 0;
102  }

◆ getParentType()

ilPageComponentPlugin::getParentType ( )

Get the object type og the parent object.

Definition at line 107 of file class.ilPageComponentPlugin.php.

107  : string
108  {
109  if (isset($this->page_obj)) {
110  return $this->page_obj->getParentType();
111  }
112  return '';
113  }

◆ getUIClassInstance()

ilPageComponentPlugin::getUIClassInstance ( )

Get UI plugin class.

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

References ilPlugin\getPluginName().

65  {
66  $class = "il" . $this->getPluginName() . "PluginGUI";
67  $obj = new $class();
68  $obj->setPlugin($this);
69  return $obj;
70  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ isValidParentType()

ilPageComponentPlugin::isValidParentType ( string  $a_type)
abstract

Determines the parent types that allow to include the new content component.

See https://docu.ilias.de/goto_docu_pg_56942_42.html

Parameters
string$a_type
Returns
bool true/false if the resource type allows

◆ onClone()

ilPageComponentPlugin::onClone ( array &  $a_properties,
string  $a_plugin_version 
)

This function is called when the page content is cloned.

Parameters
array$a_properties(properties saved in the page, should be modified if neccessary)
string$a_plugin_version(plugin version of the properties)

Definition at line 120 of file class.ilPageComponentPlugin.php.

123  : void {
124  }

◆ onDelete()

ilPageComponentPlugin::onDelete ( array  $a_properties,
string  $a_plugin_version,
bool  $move_operation = false 
)

This function is called before the page content is deleted.

Parameters
array$a_propertiesproperties saved in the page (will be deleted afterwards)
string$a_plugin_versionplugin version of the properties
bool$move_operationtrue, if the delete is part of a move operation (cut for paste, move, ...)

Definition at line 148 of file class.ilPageComponentPlugin.php.

152  : void {
153  }

◆ setMode()

ilPageComponentPlugin::setMode ( string  $a_mode)
final

Definition at line 51 of file class.ilPageComponentPlugin.php.

51  : void
52  {
53  $this->mode = $a_mode;
54  }

◆ setPageObj()

ilPageComponentPlugin::setPageObj ( ilPageObject  $a_page_obj)

Inject the page object This must be public to be called by ilPCPlugged But the page object should not directly be accessible by plugins.

Definition at line 77 of file class.ilPageComponentPlugin.php.

77  : void
78  {
79  $this->page_obj = $a_page_obj;
80  }

Field Documentation

◆ $mode

string ilPageComponentPlugin::$mode
protected

Definition at line 31 of file class.ilPageComponentPlugin.php.

Referenced by getMode().

◆ $page_obj

ilPageObject ilPageComponentPlugin::$page_obj = null
private

Definition at line 30 of file class.ilPageComponentPlugin.php.

◆ CMD_EDIT

const ilPageComponentPlugin::CMD_EDIT = "edit"

◆ CMD_INSERT

const ilPageComponentPlugin::CMD_INSERT = "insert"

◆ TXT_CMD_INSERT

const ilPageComponentPlugin::TXT_CMD_INSERT = "cmd_insert"

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