NAME

GT::Plugins::Installer


SYNOPSIS

    $mgr->install_hooks('PluginName', ['hook_name', 'PRE|POST', 'code']);
    $mgr->install_menu('PluginName', ['menu_name', 'menu_url', 'enabled']);
    $mgr->install_options('PluginName', ['option_key', 'option_val', 'instructions']);


DESCRIPTION

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

install_hooks takes as arguments the plugin name and an array of:

hook_name
The hook you want to override.

PRE/POST
Either the string PRE or POST depending on whether the hook should be run before the main code, or after.

code
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

install_hooks returns 1 on success, undef on failure with the error message in $GT::Plugins::error.

install_menu

install_menu takes as arguments the plugin name and an array of:

menu_name
The name that will show up in the admin menu.

menu_url
The URL for the menu option.

enabled
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

install_options takes as arguments the plugin name and an array of:

option_key
This is the key, and is used when accessing the options hash.

option_value
This is the default value.

instructions
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

Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved. http://www.gossamer-threads.com/


VERSION

Revision: $Id: Installer.pm,v 1.13 2004/08/23 19:54:27 jagerman Exp $