Ixonn Group

Common Module Functions

You are here:
< All Topics

register_activation_hook

/**

 * Register module activation hook

 * @param  string $module   module system name

 * @param  mixed $function  function for the hook

 * @return mixed

 */

 

register_activation_hook($module, $function)

register_deactivation_hook

/**

 * Register module deactivation hook

 * @param  string $module   module system name

 * @param  mixed $function  function for the hook

 * @return mixed

 */

 

register_deactivation_hook($module, $function)

register_uninstall_hook

/**

 * Register module uninstall hook

 * @param  string $module   module system name

 * @param  mixed $function  function for the hook

 * @return mixed

 */

 

register_uninstall_hook($module, $function)

register_cron_task

/**

 * Register module cron task, the cron task is executed after the core cron tasks are finished

 * @param  mixed $function  function/class parameter for the hook

 * @return null

 */

 

register_cron_task($function)

register_payment_gateway

 /**

     * Inject custom payment gateway into the payment gateways array

     * @param string $idpayment gateway id, should equal like the libraries/classname e.q. gateways/New_gateway

     * @param string $module       module name to load the gateway if not already loaded

     */

 

register_payment_gateway($id, $module)

register_language_files

/**

 * Register module language files to support custom_lang.php file

 * @param  string $module    module system name

 * @param  array  $languages array of language file names without the _lang.php

 * @return null

 */

 

register_language_files($module, $languages)

module_dir_url

/**

 * Module URL

 * e.q. https://crm-installation.com/module_name/

 * @param  string $module  module system name

 * @param  string $segment additional string to append to the URL

 * @return string

 */

 

module_dir_url($module, $segment = ”)

module_dir_path

 /**

 * Module directory absolute path

 * @param  string $module module system name

 * @param  string $concat append additional string to the path

 * @return string

 */

 

module_dir_path($module, $concat = ”)

module_libs_path

/**

 * Module libraries path

 * e.q. modules/module_name/libraries

 * @param  string $module module name

 * @param  string $concat append additional string to the path

 * @return string

 */

 

module_libs_path($module, $concat = ”)

Related Articles

Table of Contents
Scroll Up