GT::Plugins::Installer
$mgr->install_hooks('PluginName', ['hook_name', 'PRE|POST', 'code', status]); $mgr->install_menu('PluginName', ['menu_name', 'menu_url', 'enabled']); $mgr->install_options('PluginName', ['option_key', 'option_val', 'instructions']);
The installer is an object that is passed into plugins during installation. It provides methods to add hooks, menu options, admin options or copy files into the users application.
install_hooks
takes as arguments the plugin name and an array of:
The hook you want to override.
Either the string PRE or POST depending on whether the hook should be run before the main code, or after.
The name of the code to run. It should be Plugins::PACKAGE::YourPluginName::function. Where PACKAGE is the name of the Gossamer Product the plugin is for. For example Plugins::GMail::Wap::header
Whether or not the hook will be enabled or disabled. For backwards compatibility, if this option is set to anything but '0' then the hook will be enabled.
install_hooks
returns 1 on success, undef on failure with the error
message in $GT::Plugins::error.
install_menu
takes as arguments the plugin name and an array of:
The name that will show up in the admin menu.
The URL for the menu option.
Either true or false depending on whether the menu option should be shown.
install_menu
returns 1 on success, undef on failure with the error
message in $GT::Plugins::error.
install_options
takes as arguments the plugin name and an array of:
This is the key, and is used when accessing the options hash.
This is the default value.
A string instruction users on what the plugin does.
install_options
returns 1 on success, undef on failure with the error
message in $GT::Plugins::error.
Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved. http://www.gossamer-threads.com/
Revision: $Id: Installer.pm,v 1.15 2006/11/22 01:21:14 brewt Exp $