bugzilla-4intranet/docs/en/html/api/Bugzilla/Hook.html

518 lines
25 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>
Bugzilla::Hook</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" title="style" type="text/css" href=".././../../../style.css" media="all" >
</head>
<body id="pod">
<p class="backlinktop"><b><a name="___top" href="../index.html" accesskey="1" title="All Documents">&lt;&lt;</a></b></p>
<h1>Bugzilla::Hook</h1>
<div class='indexgroup'>
<ul class='indexList indexList1'>
<li class='indexItem indexItem1'><a href='#NAME'>NAME</a>
<li class='indexItem indexItem1'><a href='#SYNOPSIS'>SYNOPSIS</a>
<li class='indexItem indexItem1'><a href='#DESCRIPTION'>DESCRIPTION</a>
<ul class='indexList indexList2'>
<li class='indexItem indexItem2'><a href='#How_Hooks_Work'>How Hooks Work</a>
<li class='indexItem indexItem2'><a href='#Arguments_Passed_to_Hooks'>Arguments Passed to Hooks</a>
<li class='indexItem indexItem2'><a href='#Versioning_Extensions'>Versioning Extensions</a>
</ul>
<li class='indexItem indexItem1'><a href='#SUBROUTINES'>SUBROUTINES</a>
<li class='indexItem indexItem1'><a href='#HOOKS'>HOOKS</a>
<ul class='indexList indexList2'>
<li class='indexItem indexItem2'><a href='#auth-login_methods'>auth-login_methods</a>
<li class='indexItem indexItem2'><a href='#auth-verify_methods'>auth-verify_methods</a>
<li class='indexItem indexItem2'><a href='#bug-columns'>bug-columns</a>
<li class='indexItem indexItem2'><a href='#bug-end_of_create'>bug-end_of_create</a>
<li class='indexItem indexItem2'><a href='#bug-end_of_update'>bug-end_of_update</a>
<li class='indexItem indexItem2'><a href='#bug-fields'>bug-fields</a>
<li class='indexItem indexItem2'><a href='#buglist-columns'>buglist-columns</a>
<li class='indexItem indexItem2'><a href='#colchange-columns'>colchange-columns</a>
<li class='indexItem indexItem2'><a href='#config-add_panels'>config-add_panels</a>
<li class='indexItem indexItem2'><a href='#config-modify_panels'>config-modify_panels</a>
<li class='indexItem indexItem2'><a href='#enter_bug-entrydefaultvars'>enter_bug-entrydefaultvars</a>
<li class='indexItem indexItem2'><a href='#flag-end_of_update'>flag-end_of_update</a>
<li class='indexItem indexItem2'><a href='#install-before_final_checks'>install-before_final_checks</a>
<li class='indexItem indexItem2'><a href='#install-requirements'>install-requirements</a>
<li class='indexItem indexItem2'><a href='#install-update_db'>install-update_db</a>
<li class='indexItem indexItem2'><a href='#db_schema-abstract_schema'>db_schema-abstract_schema</a>
<li class='indexItem indexItem2'><a href='#mailer-before_send'>mailer-before_send</a>
<li class='indexItem indexItem2'><a href='#page-before_template'>page-before_template</a>
<li class='indexItem indexItem2'><a href='#product-confirm_delete'>product-confirm_delete</a>
<li class='indexItem indexItem2'><a href='#webservice'>webservice</a>
<li class='indexItem indexItem2'><a href='#webservice-error_codes'>webservice-error_codes</a>
</ul>
</ul>
</div>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="NAME"
>NAME</a></h1>
<p>Bugzilla::Hook - Extendable extension hooks for Bugzilla code</p>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="SYNOPSIS"
>SYNOPSIS</a></h1>
<pre class="code"> use Bugzilla::Hook;
Bugzilla::Hook::process(&#34;hookname&#34;, { arg =&#62; $value, arg2 =&#62; $value2 });</pre>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="DESCRIPTION"
>DESCRIPTION</a></h1>
<p>Bugzilla allows extension modules to drop in and add routines at arbitrary points in Bugzilla code. These points are referred to as hooks. When a piece of standard Bugzilla code wants to allow an extension to perform additional functions, it uses Bugzilla::Hook&#39;s <a href="#process" class="podlinkpod"
>&#34;process&#34;</a> subroutine to invoke any extension code if installed.</p>
<p>There is a sample extension in <em class="code">extensions/example/</em> that demonstrates most of the things described in this document, as well as many of the hooks available.</p>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="How_Hooks_Work"
>How Hooks Work</a></h2>
<p>When a hook named <code class="code">HOOK_NAME</code> is run, Bugzilla will attempt to invoke any source files named <em class="code">extensions/*/code/HOOK_NAME.pl</em>.</p>
<p>So, for example, if your extension is called &#34;testopia&#34;, and you want to have code run during the <a href="#install-update_db" class="podlinkpod"
>&#34;install-update_db&#34;</a> hook, you would have a file called <em class="code">extensions/testopia/code/install-update_db.pl</em> that contained perl code to run during that hook.</p>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="Arguments_Passed_to_Hooks"
>Arguments Passed to Hooks</a></h2>
<p>Some <a href="#HOOKS" class="podlinkpod"
>hooks</a> have params that are passed to them.</p>
<p>These params are accessible through <a href="../Bugzilla.html#hook_args" class="podlinkpod"
>&#34;hook_args&#34; in Bugzilla</a>. That returns a hashref. Very frequently, if you want your hook to do anything, you have to modify these variables.</p>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="Versioning_Extensions"
>Versioning Extensions</a></h2>
<p>Every extension must have a file in its root called <em class="code">info.pl</em>. This file must return a hash when called with <code class="code">do</code>. The hash must contain a &#39;version&#39; key with the current version of the extension. Extension authors can also add any extra infomration to this hash if required, by adding a new key beginning with x_ which will not be used the core Bugzilla code.</p>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="SUBROUTINES"
>SUBROUTINES</a></h1>
<dl>
<dt><a name="process"
><code class="code">process</code></a></dt>
<dd>
<dl>
<dt><a name="Description"
><b>Description</b></a></dt>
<dd>
<p>Invoke any code hooks with a matching name from any installed extensions.</p>
<p>See <code class="code">customization.xml</code> in the Bugzilla Guide for more information on Bugzilla&#39;s extension mechanism.</p>
<dt><a name="Params"
><b>Params</b></a></dt>
<dd>
<dl>
<dt><a name="$name_-_The_name_of_the_hook_to_invoke."
><code class="code">$name</code> - The name of the hook to invoke.
<dt><a name="$args_-_A_hashref._The_named_args_to_pass_to_the_hook._They_will_be_accessible_to_the_hook_via_&#34;hook_args&#34;_in_Bugzilla."
><code class="code">$args</code> - A hashref. The named args to pass to the hook. They will be accessible to the hook via <a href="../Bugzilla.html#hook_args" class="podlinkpod"
>&#34;hook_args&#34; in Bugzilla</a>.</a></dt>
</dl>
<dt><a name="Returns_(nothing)"
><b>Returns</b> (nothing)</a></dt>
</dl>
</dd>
</dl>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="HOOKS"
>HOOKS</a></h1>
<p>This describes what hooks exist in Bugzilla currently. They are mostly in alphabetical order, but some related hooks are near each other instead of being alphabetical.</p>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="auth-login_methods"
>auth-login_methods</a></h2>
<p>This allows you to add new login types to Bugzilla. (See <a href="../Bugzilla/Auth/Login.html" class="podlinkpod"
>Bugzilla::Auth::Login</a>.)</p>
<p>Params:</p>
<dl>
<dt><a name="modules"
><code class="code">modules</code></a></dt>
<dd>
<p>This is a hash--a mapping from login-type &#34;names&#34; to the actual module on disk. The keys will be all the values that were passed to <a href="../Bugzilla/Auth.html#login" class="podlinkpod"
>&#34;login&#34; in Bugzilla::Auth</a> for the <code class="code">Login</code> parameter. The values are the actual path to the module on disk. (For example, if the key is <code class="code">DB</code>, the value is <em class="code">Bugzilla/Auth/Login/DB.pm</em>.)</p>
<p>For your extension, the path will start with <em class="code">extensions/yourextension/lib/</em>. (See the code in the example extension.)</p>
<p>If your login type is in the hash as a key, you should set that key to the right path to your module. That module&#39;s <code class="code">new</code> method will be called, probably with empty parameters. If your login type is <i>not</i> in the hash, you should not set it.</p>
<p>You will be prevented from adding new keys to the hash, so make sure your key is in there before you modify it. (In other words, you can&#39;t add in login methods that weren&#39;t passed to <a href="../Bugzilla/Auth.html#login" class="podlinkpod"
>&#34;login&#34; in Bugzilla::Auth</a>.)</p>
</dd>
</dl>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="auth-verify_methods"
>auth-verify_methods</a></h2>
<p>This works just like <a href="#auth-login_methods" class="podlinkpod"
>&#34;auth-login_methods&#34;</a> except it&#39;s for login verification methods (See <a href="../Bugzilla/Auth/Verify.html" class="podlinkpod"
>Bugzilla::Auth::Verify</a>.) It also takes a <code class="code">modules</code> parameter, just like <a href="#auth-login_methods" class="podlinkpod"
>&#34;auth-login_methods&#34;</a>.</p>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="bug-columns"
>bug-columns</a></h2>
<p>This allows you to add new fields that will show up in every <a href="../Bugzilla/Bug.html" class="podlinkpod"
>Bugzilla::Bug</a> object. Note that you will also need to use the <a href="#bug-fields" class="podlinkpod"
>&#34;bug-fields&#34;</a> hook in conjunction with this hook to make this work.</p>
<p>Params:</p>
<dl>
<dt><a name="columns_-_An_arrayref_containing_an_array_of_column_names._Push_your_column_name(s)_onto_the_array."
><code class="code">columns</code> - An arrayref containing an array of column names. Push your column name(s) onto the array.</a></dt>
</dl>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="bug-end_of_create"
>bug-end_of_create</a></h2>
<p>This happens at the end of <a href="../Bugzilla/Bug.html#create" class="podlinkpod"
>&#34;create&#34; in Bugzilla::Bug</a>, after all other changes are made to the database. This occurs inside a database transaction.</p>
<p>Params:</p>
<dl>
<dt><a name="bug_-_The_changed_bug_object,_with_all_fields_set_to_their_updated_values."
><code class="code">bug</code> - The changed bug object, with all fields set to their updated values.
<dt><a name="timestamp_-_The_timestamp_used_for_all_updates_in_this_transaction."
><code class="code">timestamp</code> - The timestamp used for all updates in this transaction.</a></dt>
</dl>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="bug-end_of_update"
>bug-end_of_update</a></h2>
<p>This happens at the end of <a href="../Bugzilla/Bug.html#update" class="podlinkpod"
>&#34;update&#34; in Bugzilla::Bug</a>, after all other changes are made to the database. This generally occurs inside a database transaction.</p>
<p>Params:</p>
<dl>
<dt><a name="bug_-_The_changed_bug_object,_with_all_fields_set_to_their_updated_values."
><code class="code">bug</code> - The changed bug object, with all fields set to their updated values.
<dt><a name="timestamp_-_The_timestamp_used_for_all_updates_in_this_transaction."
><code class="code">timestamp</code> - The timestamp used for all updates in this transaction.
<dt><a name="changes_-_The_hash_of_changed_fields._$changes-&#62;{field}_=_[old,_new]"
><code class="code">changes</code> - The hash of changed fields. <code class="code">$changes-&#62;{field} = [old, new]</code></a></dt>
</dl>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="bug-fields"
>bug-fields</a></h2>
<p>Allows the addition of database fields from the bugs table to the standard list of allowable fields in a <a href="../Bugzilla/Bug.html" class="podlinkpod"
>Bugzilla::Bug</a> object, so that you can call the field as a method.</p>
<p>Note: You should add here the names of any fields you added in <a href="#bug-columns" class="podlinkpod"
>&#34;bug-columns&#34;</a>.</p>
<p>Params:</p>
<dl>
<dt><a name="columns_-_A_arrayref_containing_an_array_of_column_names._Push_your_column_name(s)_onto_the_array."
><code class="code">columns</code> - A arrayref containing an array of column names. Push your column name(s) onto the array.</a></dt>
</dl>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="buglist-columns"
>buglist-columns</a></h2>
<p>This happens in buglist.cgi after the standard columns have been defined and right before the display column determination. It gives you the opportunity to add additional display columns.</p>
<p>Params:</p>
<dl>
<dt><a
><code class="code">columns</code> - A hashref, where the keys are unique string identifiers for the column being defined and the values are hashrefs with the following fields:</a></dt>
<dd>
<dl>
<dt><a name="name_-_The_name_of_the_column_in_the_database."
><code class="code">name</code> - The name of the column in the database.
<dt><a name="title_-_The_title_of_the_column_as_displayed_to_users."
><code class="code">title</code> - The title of the column as displayed to users.</a></dt>
</dl>
<p>The definition is structured as:</p>
<pre class="code"> $columns-&#62;{$id} = { name =&#62; $name, title =&#62; $title };</pre>
</dd>
</dl>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="colchange-columns"
>colchange-columns</a></h2>
<p>This happens in <em class="code">colchange.cgi</em> right after the list of possible display columns have been defined and gives you the opportunity to add additional display columns to the list of selectable columns.</p>
<p>Params:</p>
<dl>
<dt><a
><code class="code">columns</code> - An arrayref containing an array of column IDs. Any IDs added by this hook must have been defined in the the buglist-columns hook. See <a href="#buglist-columns" class="podlinkpod"
>&#34;buglist-columns&#34;</a>.</a></dt>
</dl>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="config-add_panels"
>config-add_panels</a></h2>
<p>If you want to add new panels to the Parameters administrative interface, this is where you do it.</p>
<p>Params:</p>
<dl>
<dt><a name="panel_modules"
><code class="code">panel_modules</code></a></dt>
<dd>
<p>A hashref, where the keys are the &#34;name&#34; of the module and the value is the Perl module containing that config module. For example, if the name is <code class="code">Auth</code>, the value would be <code class="code">Bugzilla::Config::Auth</code>.</p>
<p>For your extension, the Perl module name must start with <code class="code">extensions::yourextension::lib</code>. (See the code in the example extension.)</p>
</dd>
</dl>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="config-modify_panels"
>config-modify_panels</a></h2>
<p>This is how you modify already-existing panels in the Parameters administrative interface. For example, if you wanted to add a new Auth method (modifying Bugzilla::Config::Auth) this is how you&#39;d do it.</p>
<p>Params:</p>
<dl>
<dt><a name="panels"
><code class="code">panels</code></a></dt>
<dd>
<p>A hashref, where the keys are lower-case panel &#34;names&#34; (like <code class="code">auth</code>, <code class="code">admin</code>, etc.) and the values are hashrefs. The hashref contains a single key, <code class="code">params</code>. <code class="code">params</code> is an arrayref--the return value from <code class="code">get_param_list</code> for that module. You can modify <code class="code">params</code> and your changes will be reflected in the interface.</p>
<p>Adding new keys to <code class="code">panels</code> will have no effect. You should use <a href="#config-add_panels" class="podlinkpod"
>&#34;config-add_panels&#34;</a> if you want to add new panels.</p>
</dd>
</dl>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="enter_bug-entrydefaultvars"
>enter_bug-entrydefaultvars</a></h2>
<p>This happens right before the template is loaded on enter_bug.cgi.</p>
<p>Params:</p>
<dl>
<dt><a name="vars_-_A_hashref._The_variables_that_will_be_passed_into_the_template."
><code class="code">vars</code> - A hashref. The variables that will be passed into the template.</a></dt>
</dl>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="flag-end_of_update"
>flag-end_of_update</a></h2>
<p>This happens at the end of <a href="../Bugzilla/Flag.html#process" class="podlinkpod"
>&#34;process&#34; in Bugzilla::Flag</a>, after all other changes are made to the database and after emails are sent. It gives you a before/after snapshot of flags so you can react to specific flag changes. This generally occurs inside a database transaction.</p>
<p>Note that the interface to this hook is <b>UNSTABLE</b> and it may change in the future.</p>
<p>Params:</p>
<dl>
<dt><a name="bug_-_The_changed_bug_object."
><code class="code">bug</code> - The changed bug object.
<dt><a name="timestamp_-_The_timestamp_used_for_all_updates_in_this_transaction."
><code class="code">timestamp</code> - The timestamp used for all updates in this transaction.
<dt><a name="old_flags_-_The_snapshot_of_flag_summaries_from_before_the_change."
><code class="code">old_flags</code> - The snapshot of flag summaries from before the change.
<dt><a
><code class="code">new_flags</code> - The snapshot of flag summaries after the change. Call <code class="code">my ($removed, $added) = diff_arrays(old_flags, new_flags)</code> to get the list of changed flags, and search for a specific condition like <code class="code">added eq &#39;review-&#39;</code>.</a></dt>
</dl>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="install-before_final_checks"
>install-before_final_checks</a></h2>
<p>Allows execution of custom code before the final checks are done in checksetup.pl.</p>
<p>Params:</p>
<dl>
<dt><a name="silent"
><code class="code">silent</code></a></dt>
<dd>
<p>A flag that indicates whether or not checksetup is running in silent mode.</p>
</dd>
</dl>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="install-requirements"
>install-requirements</a></h2>
<p>Because of the way Bugzilla installation works, there can&#39;t be a normal hook during the time that <em class="code">checksetup.pl</em> checks what modules are installed. (<code class="code">Bugzilla::Hook</code> needs to have those modules installed--it&#39;s a chicken-and-egg problem.)</p>
<p>So instead of the way hooks normally work, this hook just looks for two subroutines (or constants, since all constants are just subroutines) in your file, called <code class="code">OPTIONAL_MODULES</code> and <code class="code">REQUIRED_MODULES</code>, which should return arrayrefs in the same format as <code class="code">OPTIONAL_MODULES</code> and <code class="code">REQUIRED_MODULES</code> in <a href="../Bugzilla/Install/Requirements.html" class="podlinkpod"
>Bugzilla::Install::Requirements</a>.</p>
<p>These subroutines will be passed an arrayref that contains the current Bugzilla requirements of the same type, in case you want to modify Bugzilla&#39;s requirements somehow. (Probably the most common would be to alter a version number or the &#34;feature&#34; element of <code class="code">OPTIONAL_MODULES</code>.)</p>
<p><em class="code">checksetup.pl</em> will add these requirements to its own.</p>
<p>Please remember--if you put something in <code class="code">REQUIRED_MODULES</code>, then <em class="code">checksetup.pl</em> <b>cannot complete</b> unless the user has that module installed! So use <code class="code">OPTIONAL_MODULES</code> whenever you can.</p>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="install-update_db"
>install-update_db</a></h2>
<p>This happens at the very end of all the tables being updated during an installation or upgrade. If you need to modify your custom schema, do it here. No params are passed.</p>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="db_schema-abstract_schema"
>db_schema-abstract_schema</a></h2>
<p>This allows you to add tables to Bugzilla. Note that we recommend that you prefix the names of your tables with some word, so that they don&#39;t conflict with any future Bugzilla tables.</p>
<p>If you wish to add new <i>columns</i> to existing Bugzilla tables, do that in <a href="#install-update_db" class="podlinkpod"
>&#34;install-update_db&#34;</a>.</p>
<p>Params:</p>
<dl>
<dt><a
><code class="code">schema</code> - A hashref, in the format of <a href="../Bugzilla/DB/Schema.html#ABSTRACT_SCHEMA" class="podlinkpod"
>&#34;ABSTRACT_SCHEMA&#34; in Bugzilla::DB::Schema</a>. Add new hash keys to make new table definitions. <em class="code">checksetup.pl</em> will automatically add these tables to the database when run.</a></dt>
</dl>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="mailer-before_send"
>mailer-before_send</a></h2>
<p>Called right before <a href="../Bugzilla/Mailer.html" class="podlinkpod"
>Bugzilla::Mailer</a> sends a message to the MTA.</p>
<p>Params:</p>
<dl>
<dt><a name="email_-_The_Email::MIME_object_that&#39;s_about_to_be_sent."
><code class="code">email</code> - The <code class="code">Email::MIME</code> object that&#39;s about to be sent.</a></dt>
</dl>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="page-before_template"
>page-before_template</a></h2>
<p>This is a simple way to add your own pages to Bugzilla. This hooks <code class="code">page.cgi</code>, which loads templates from <em class="code">template/en/default/pages</em>. For example, <code class="code">page.cgi?id=fields.html</code> loads <em class="code">template/en/default/pages/fields.html.tmpl</em>.</p>
<p>This hook is called right before the template is loaded, so that you can pass your own variables to your own pages.</p>
<p>Params:</p>
<dl>
<dt><a name="page_id"
><code class="code">page_id</code></a></dt>
<dd>
<p>This is the name of the page being loaded, like <code class="code">fields.html</code>.</p>
<p>Note that if two extensions use the same name, it is uncertain which will override the others, so you should be careful with how you name your pages.</p>
<dt><a name="vars"
><code class="code">vars</code></a></dt>
<dd>
<p>This is a hashref--put variables into here if you want them passed to your template.</p>
</dd>
</dl>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="product-confirm_delete"
>product-confirm_delete</a></h2>
<p>Called before displaying the confirmation message when deleting a product.</p>
<p>Params:</p>
<dl>
<dt><a name="vars_-_The_template_vars_hashref."
><code class="code">vars</code> - The template vars hashref.</a></dt>
</dl>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="webservice"
>webservice</a></h2>
<p>This hook allows you to add your own modules to the WebService. (See <a href="../Bugzilla/WebService.html" class="podlinkpod"
>Bugzilla::WebService</a>.)</p>
<p>Params:</p>
<dl>
<dt><a name="dispatch"
><code class="code">dispatch</code></a></dt>
<dd>
<p>A hashref that you can specify the names of your modules and what Perl module handles the functions for that module. (This is actually sent to <a href="../SOAP/Lite.html#dispatch_with" class="podlinkpod"
>&#34;dispatch_with&#34; in SOAP::Lite</a>. You can see how that&#39;s used in <em class="code">xmlrpc.cgi</em>.)</p>
<p>The Perl module name must start with <code class="code">extensions::yourextension::lib::</code> (replace <code class="code">yourextension</code> with the name of your extension). The <code class="code">package</code> declaration inside that module must also start with <code class="code">extensions::yourextension::lib::</code> in that module&#39;s code.</p>
<p>Example:</p>
<pre class="code"> $dispatch-&#62;{Example} = &#34;extensions::example::lib::Example&#34;;</pre>
<p>And then you&#39;d have a module <em class="code">extensions/example/lib/Example.pm</em></p>
<p>It&#39;s recommended that all the keys you put in <code class="code">dispatch</code> start with the name of your extension, so that you don&#39;t conflict with the standard Bugzilla WebService functions (and so that you also don&#39;t conflict with other plugins).</p>
</dd>
</dl>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="webservice-error_codes"
>webservice-error_codes</a></h2>
<p>If your webservice extension throws custom errors, you can set numeric codes for those errors here.</p>
<p>Extensions should use error codes above 10000, unless they are re-using an already-existing error code.</p>
<p>Params:</p>
<dl>
<dt><a name="error_map"
><code class="code">error_map</code></a></dt>
<dd>
<p>A hash that maps the names of errors (like <code class="code">invalid_param</code>) to numbers. See <a href="../Bugzilla/WebService/Constants.html#WS_ERROR_CODE" class="podlinkpod"
>&#34;WS_ERROR_CODE&#34; in Bugzilla::WebService::Constants</a> for an example.</p>
</dd>
</dl>
<p class="backlinkbottom"><b><a name="___bottom" href="../index.html" title="All Documents">&lt;&lt;</a></b></p>
<!-- end doc -->
</body></html>