/sources/addons.php

Description
Functions
create_addon (line 268)

Create an addon to spec.

void create_addon (string $file, array $files, string $name, string $incompatibilities, string $dependencies, string $author, string $organisation, string $version, string $description, [PATH $dir = 'exports/mods'])
  • string $file: Filename to create in exports/mods directory (should end in .tar)
  • array $files: List of files to include
  • string $name: Addon name
  • string $incompatibilities: Addon incompatibilities (comma-separated)
  • string $dependencies: Addon dependencies (comma-separated)
  • string $author: Addon author
  • string $organisation: Addon organisation
  • string $version: Addon version
  • string $description: Addon description
  • PATH $dir: Directory to save to
find_addon_dependencies_on (line 191)

Find addon dependencies.

  • return: List of dependencies
array find_addon_dependencies_on (string $name)
  • string $name: The name of the addon
find_available_addons (line 139)

Find all the available addons (addons in imports/mods that are not necessarily installed).

  • return: List of maps describing the available addons
array find_available_addons ()
find_installed_addons (line 56)

Find all the installed addons.

  • return: List of maps describing the available addons (simulating partial-extended versions of the traditional ocPortal-addon database row)
array find_installed_addons ()
inform_about_addon_install (line 570)

Get information for the user relating to an addon that they are intending to install.

  • return: Triple: warnings, files, addon info array
array inform_about_addon_install (string $file, [?array $also_uninstalling = NULL])
  • string $file: Filename of the addon TAR file
  • ?array $also_uninstalling: List of addons that we're currently uninstalling (so dependencies from these are irrelevant). (NULL: none)
inform_about_addon_uninstall (line 729)

Get information for the user relating to an addon that they are intending to uninstall.

  • return: Pair: warnings, files
array inform_about_addon_uninstall (string $name, [?array $also_uninstalling = NULL])
  • string $name: Name of the addon
  • ?array $also_uninstalling: List of addons that we're currently uninstalling (so dependencies from these are irrelevant). (NULL: none)
install_addon (line 347)

Uninstall an addon.

void install_addon (string $file, [?array $files = NULL])
  • string $file: Name of the addon
  • ?array $files: The files to install (NULL: all)
make_global_file_list (line 27)

Change an ocProducts new style addon file list to have real paths.

  • return: Real list
array make_global_file_list (array $list)
  • array $list: Shorthand list
read_addon_info (line 217)

Get info about an addon, simulating an extended version of the traditional ocPortal-addon database row.

  • return: The map of details
array read_addon_info (string $name)
  • string $name: The name of the addon
uninstall_addon (line 506)

Uninstall an addon.

void uninstall_addon (string $name)
  • string $name: Name of the addon

Documentation generated on Sun, 02 Jan 2011 23:06:58 +0000 by phpDocumentor 1.4.3