ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
ExamplePlugin Class Reference

Extend some more concrete implementation of. More...

+ Inheritance diagram for ExamplePlugin:
+ Collaboration diagram for ExamplePlugin:

Public Member Functions

 exchangeUIRendererAfterInitialization (Container $dic)
 This method can ALWAYS replace the UI renderer, because the method is only ever invoked if a plugin is considered active. More...
 
 getPluginName ()
 
 exchangeUIRendererAfterInitialization (Container $dic)
 This method can ALWAYS replace the UI renderer, because the method is only ever invoked if a plugin is considered active. More...
 
 getPluginName ()
 
- Public Member Functions inherited from ilUserInterfaceHookPlugin
 getComponentType ()
 
 getComponentName ()
 
 getSlot ()
 
 getSlotId ()
 
- Public Member Functions inherited from ilPlugin
 __construct ()
 
 getComponentType ()
 Get Component Type. More...
 
 getComponentName ()
 Get Component Name. More...
 
 getSlot ()
 Get Slot Name. More...
 
 getSlotId ()
 Get Slot ID. More...
 
 getPluginName ()
 Get Plugin Name. More...
 
 getId ()
 
 getLastUpdateVersion ()
 Get Version of last update. More...
 
 getVersion ()
 
 getIliasMinVersion ()
 
 getIliasMaxVersion ()
 Get Required ILIAS max. More...
 
 getActive ()
 
 setDBVersion (int $a_dbversion)
 
 getDBVersion ()
 
 writeDBVersion (int $a_dbversion)
 
 getDirectory ()
 Get Plugin Directory. More...
 
 includeClass ($a_class_file_name)
 Include (once) a class file. More...
 
 getPrefix ()
 Get plugin prefix, used for lang vars. More...
 
 getTablePrefix ()
 Get db table plugin prefix. More...
 
 updateLanguages ($a_lang_keys=null)
 
 updateDatabase ()
 Update database. More...
 
 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)
 gets a ilTemplate instance of a html-file in the plugin /templates More...
 
 getImagePath (string $a_img)
 Get image path. More...
 
 getStyleSheetLocation (string $a_css_file)
 
 addBlockFile ($a_tpl, $a_var, $a_block, $a_tplname)
 Add template content to placeholder variable. More...
 
 isActive ()
 Check whether plugin is active. More...
 
 needsUpdate ()
 Check whether update is needed. More...
 
 install ()
 
 activate ()
 Activate. More...
 
 deactivate ()
 Deactivate. More...
 
 uninstall ()
 
 update ()
 Update plugin. More...
 
 promoteGlobalScreenProvider ()
 
 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...
 
 getMessage ()
 

Additional Inherited Members

- Static Public Member Functions inherited from ilPlugin
static _getDirectory (string $a_ctype, string $a_cname, string $a_slot_id, string $a_pname)
 Get plugin directory. More...
 
static getAvailableLangFiles (string $a_lang_directory)
 Get array of all language files in the plugin. More...
 
static hasConfigureClass (string $a_slot_dir, array $plugin_data, array $plugin_db_data)
 Has the plugin a configure class? More...
 
static getConfigureClassName (array $plugin_data)
 Get plugin configure class name. More...
 
static getDBUpdateScriptName (string $a_ctype, string $a_cname, string $a_slot_name, string $a_pname)
 
static lookupTxt (string $a_mod_prefix, string $a_pl_id, string $a_lang_var)
 
static langExitsById (string $pluginId, string $langVar)
 Is searched lang var available in plugin lang files. More...
 
static _getImagePath (string $a_ctype, string $a_cname, string $a_slot_id, string $a_pname, string $a_img)
 
static createPluginRecord (string $a_ctype, string $a_cname, string $a_slot_id, string $a_pname)
 
static getPluginRecord (string $a_ctype, string $a_cname, string $a_slot_id, string $a_pname)
 
static getPluginObject (string $a_ctype, string $a_cname, string $a_slot_id, string $a_pname)
 
static lookupStoredData (string $a_ctype, string $a_cname, string $a_slot_id, string $a_pname)
 Lookup information data in il_plugin. More...
 
static getActivePluginsForSlot (string $a_ctype, string $a_cname, string $a_slot_id)
 
static getActivePluginIdsForSlot (string $a_ctype, string $a_cname, string $a_slot_id)
 Get All active plugin ids for a slot. More...
 
static lookupNameForId (string $a_ctype, string $a_cname, string $a_slot_id, string $a_plugin_id)
 
static lookupIdForName (string $a_ctype, string $a_cname, string $a_slot_id, string $a_plugin_name)
 
static lookupTypeInformationsForId (string $id)
 
- Protected Member Functions inherited from ilUserInterfaceHookPlugin
 slotInit ()
 Object initialization done by slot. More...
 
- Protected Member Functions inherited from ilPlugin
 setSlotObject (ilPluginSlot $a_slot)
 
 getSlotObject ()
 
 getClassesDirectory ()
 
 getLanguageDirectory ()
 
 slotInit ()
 Object initialization done by slot. More...
 
 init ()
 Object initialization. More...
 
 afterInstall ()
 After install processing. More...
 
 beforeActivation ()
 Before activation processing. More...
 
 afterActivation ()
 After activation processing. More...
 
 afterDeactivation ()
 After deactivation processing. More...
 
 beforeUninstall ()
 
 afterUninstall ()
 This is Plugin-Specific and is triggered after the uninstall command of a plugin. More...
 
 readEventListening ()
 Read the event listening definitions from the plugin.xml (if file exists) More...
 
 clearEventListening ()
 Clear the entries of this plugin in the event handling table. More...
 
 beforeUpdate ()
 Before update processing. More...
 
 afterUpdate ()
 After update processing. More...
 
- Protected Attributes inherited from ilPlugin
 $slot
 
 $active = false
 
 $iliasmaxversion = ""
 
 $iliasminversion = ""
 
 $version = ""
 
 $lastupdateversion = ""
 
 $dbversion = 0
 
 $lang_initialised = false
 
 $id = ''
 
 $provider_collection
 
 $message
 

Detailed Description

Extend some more concrete implementation of.

See also
ilPlugin depending on your plugin-slot.

Definition at line 26 of file ExamplePlugin.php.

Member Function Documentation

◆ exchangeUIRendererAfterInitialization() [1/2]

ExamplePlugin::exchangeUIRendererAfterInitialization ( Container  $dic)

This method can ALWAYS replace the UI renderer, because the method is only ever invoked if a plugin is considered active.

Definition at line 32 of file ExamplePlugin.php.

32  : Closure
33  {
34  // we need the previous renderer, which has possibly been exchanged, so we can
35  // wrap it by our renderer and keep the rendering chain alive.
36  $renderer = $dic->raw('ui.renderer');
37 
38  return static function () use ($dic, $renderer) {
39  // you may also pass additional dependencies like the ResourceRegistry to
40  // properly register you assets.
41  return new HelloWorldRenderer(
42  $dic['ui.resource_registry'],
43  $renderer($dic)
44  );
45  };
46  }
Extend the DecoratedRenderer to align your renderer with other potential renderers in ILIAS...

◆ exchangeUIRendererAfterInitialization() [2/2]

ExamplePlugin::exchangeUIRendererAfterInitialization ( Container  $dic)

This method can ALWAYS replace the UI renderer, because the method is only ever invoked if a plugin is considered active.

Definition at line 32 of file ExamplePlugin.php.

32  : Closure
33  {
34  // we need the previous renderer, which has possibly been exchanged, so we can
35  // wrap it by our renderer and keep the rendering chain alive.
36  $renderer = $dic->raw('ui.renderer');
37 
38  return static function () use ($dic, $renderer) {
39  // create an instance of the renderer using the Closure from the container.
40  return new ExampleRenderer($renderer($dic));
41  };
42  }
Extend the DecoratedRenderer to align your renderer with other potential renderers in ILIAS...

◆ getPluginName() [1/2]

ExamplePlugin::getPluginName ( )

Definition at line 44 of file ExamplePlugin.php.

44  : string
45  {
46  return "NoRealPlugin";
47  }

◆ getPluginName() [2/2]

ExamplePlugin::getPluginName ( )

Definition at line 48 of file ExamplePlugin.php.

48  : string
49  {
50  return "NoRealPlugin";
51  }

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