File/program/lib/modulemanagerlib.php

Description

/program/lib/modulemanagerlib.php - modulemanager

Constants
TASK_MODULEMANAGER_EDIT = edit (line 29)
TASK_MODULEMANAGER_INTRO = intro (line 27)
TASK_MODULEMANAGER_SAVE = save (line 28)
Functions
job_modulemanager (line 40)

main entry point for modulemanager (called from /program/main_admin.php)

this routine dispatches the tasks, If the specified task is not recognised, the default task TASK_MODULEMANAGER_INTRO is executed.

  • return: results are returned as output in $output
void job_modulemanager (object &$output)
  • object &$output: collects the html output
modulemanager_cmp (line 153)

compare two arrays by the title member (for sorting modules)

void modulemanager_cmp (array $a, array $b)
  • array $a
  • array $b: $return int indicating the ordering of $a and $b like strcmp()
modulemanager_get_modules (line 120)

retrieve a list of modules that should appear in the module manager

this routine returns an array with id, name, title and description of all active modules that have at least one parameter in the modules_properties table. If there are no modules available (or an error occurs) an empty array is returned. The modules in the list is ordered by the translated name (title) of the module, i.e. the order depends on the current translation language.

  • return: list of modules sorted by (translated) title
array modulemanager_get_modules ([bool $forced = FALSE])
  • bool $forced: if TRUE a fresh trip to the database is forced
modulemanager_process (line 178)

handle the editing/saving of the main configuration information

this routine handles editing of the main configuration parameters. It either displays the edit dialog or saves the modified data and shows the configuration manager introduction screen.

Note that we do NOT try to redirect the user via a header() after a succesful save. It would be handy because this particular save action may have had impact on the global configuration, which is already read at this point. By redirecting we would make a fresh start, with the new parameters. However, we lose the easy ability to tell the user that the data was saved (via $output->add_message()). So, either no feedback or obsolete global config in core. Hmmmm. I settle for the feedback and the 'wrong' settings.

  • return: results are returned as output in $output
  • uses: ConfigAssistant()
void modulemanager_process (object &$output,  $task)
  • object &$output: collects the html output
  • $task
modulemanager_show_intro (line 71)

display an introductory text for the module manager

  • return: results are returned as output in $output
void modulemanager_show_intro (object &$output)
  • object &$output: collects the html output
modulemanager_show_menu (line 83)

display the module manager menu

  • return: results are returned as output in $output
void modulemanager_show_menu (object &$output, [string $current_module = NULL])
  • object &$output: collects the html output
  • string $current_module: indicates the current menu selection (if any)

Documentation generated on Tue, 28 Jun 2016 19:10:31 +0200 by phpDocumentor 1.4.0