Skip to content
forked from fluxfw/SrTile

Custom ILIAS tile repository view

Notifications You must be signed in to change notification settings

Minervis-GmbH/MTile

This branch is up to date with fluxfw/SrTile:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

468ee92 · Aug 16, 2022
Nov 5, 2021
Jul 31, 2020
Nov 12, 2020
Sep 18, 2019
Sep 18, 2020
Jun 16, 2020
Jun 2, 2020
Aug 16, 2022
Feb 7, 2020
Jul 18, 2022
Jul 18, 2022
Jul 18, 2022
Aug 16, 2022
Jul 18, 2022
Aug 16, 2022
Jul 18, 2022
Jul 18, 2022
Aug 16, 2022
Jul 18, 2022
Jun 16, 2020

Repository files navigation

SrTile ILIAS Plugin

Custom ILIAS tile repository view

This project is licensed under the GPL-3.0-only license

Requirements

  • ILIAS 6.0 - 7.999
  • PHP >=7.2

Installation

Start at your ILIAS root directory

mkdir -p Customizing/global/plugins/Services/UIComponent/UserInterfaceHook
cd Customizing/global/plugins/Services/UIComponent/UserInterfaceHook
git clone https://github.com/fluxfw/SrTile.git SrTile

Update, activate and config the plugin in the ILIAS Plugin Administration

ILIAS 7 core ilCtrl patch

For make this plugin work with ilCtrl in ILIAS 7, you may need to patch the core, before you update the plugin (At your own risk)

Start at the plugin directory

./vendor/srag/dic/bin/ilias7_core_apply_ilctrl_patch.sh

Description

Tiles: Tiles

Tab: Tiles

Tile config: Tiles

Custom event plugins

If you need to adapt some custom SrTile changes which can not be configured to your needs, SrTile will trigger some events, you can listen and react to this in an other custom plugin (plugin type is no matter)

First create or extend a plugin.xml in your custom plugin (You need to adapt PLUGIN_ID with your own plugin id) to tell ILIAS, your plugins wants to listen to SrTile events (You need also to increase your plugin version for take effect)

<?php xml version = "1.0" encoding = "UTF-8"?>
<plugin id="PLUGIN_ID">
	<events>
		<event id="Plugins/SrTile" type="listen" />
	</events>
</plugin>

In your plugin class implement or extend the handleEvent method

...
require_once __DIR__ . "/../../SrTile/vendor/autoload.php";
...
class ilXPlugin extends ...
...
	/**
	 * @inheritDoc
	 */
	public function handleEvent(/*string*/ $a_component, /*string*/ $a_event, /*array*/ $a_parameter)/*: void*/ {
		switch ($a_component) {
			case IL_COMP_PLUGIN . "/" . ilSrTilePlugin::PLUGIN_NAME:
				switch ($a_event) {
					case ilSrTilePlugin::EVENT_...:
						...
						break;

					default:
						break;
				}
				break;

			default:
				break;
		}
	}
...
Event Parameters Purpose
ilSrTilePlugin::EVENT_CHANGE_TILE_BEFORE_RENDER tile => object<Tile> Change some tile properties before it will be rendered
ilSrTilePlugin::EVENT_SHOULD_NOT_DISPLAY_ALERT_MESSAGE lang_module => string
lang_key => string
alert_type => string
should_not_display => &array
May you want not to to display all alert messages, so you can filter and add true to should_not_display (Please note should_not_display is a reference variable, if it should not works)

About

Custom ILIAS tile repository view

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 96.6%
  • Less 2.0%
  • Other 1.4%