public function onBeforeDefineVikAppointmentsMenuType() : string

Fires while fetching the type of menu to use for the back-end of VikAppointments.


Description

Plugins can use this filter to change the type of menu at runtime.

By default, VikAppointments supports only 2 types of menu:

  • leftboard, placed on the left side (default on Joomla 3);
  • horizontal, placed above the plugin contents (default on Joomla 4).

In case you wish to create your own layout, you can define all the required classes here:

/components/com_vikappointments/helpers/libraries/menu/[MENU_TYPE]/

All the layouts should be placed here instead:

/administrator/components/com_vikappointments/layouts/menu/[MENU_TYPE]/

In case the specified layout doesn't exist, an exception will be thrown.


Return Value

String. The type of the menu to use.


Example

The example below explains how to restore the leftboard layout also on Joomla 4.

/**
 * Trigger event to allow the plugins to choose a specific type to
 * use for the layout of the back-end menu.
 *
 * @return  string   The menu type to use.
 */
public function onBeforeDefineVikAppointmentsMenuType()
{
    return 'leftboard';
}

Changelog

VersionDescription
1.6.3 Introduced.
Last Update: 2021-10-05 16:26
Helpful?
See Also: