public function onSetupVikRestaurantsWizard( Wizard $wizard ) : void

Fires while initializing the wizard instance.


Description

Trigger hook on wizard setup, useful to preload all the needed resources. 


Parameters

$wizard

(Wizard)  The instance handling the wizard steps. This class is part of the E4J\VikRestaurants\Wizard namespace.

Return Value

None.


Example

The example below adds support for all the wizard steps contained in a specific folder of the plugin. Such as:

/plugins/vikrestaurants/e4j/wizard/

All the PHP files contained within the wizard folder of the VikRestaurants - E4J plugin will be loaded.

/**
 * Trigger event on wizard setup, useful to preload all the needed resources.
 *
 * @param   Wizard  $wizard  The wizard instance.
 *
 * @return  void
 */
public function onSetupVikRestaurantsWizard($wizard)
{
    // create base path to "wizard" folder contained within the plugin
    $base = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'wizard' . DIRECTORY_SEPARATOR;

    // register folder as wizard include path
    $wizard->addIncludePath($base);
}

Changelog

Version Description
1.8.2 Introduced.
Last Update: 2023-12-29 14:15
Helpful?
See Also: