Jump to content
Wiki Home
EPrints Home
Bazaar
Files
Main menu
Main menu
move to sidebar
hide
Navigation
Front Page
EPrints 3 Manual
EPrints Training Course
EPrints Glossary
Installing EPrints
How-to Configure EPrints
EPrints 3.2+ API
EPrints 3 Reference
EPrints Plugins
Wiki
All categories
Recent changes
Main Page
Help
EPrints Documentation
Search
Search
Appearance
Log in
Request account
Personal tools
Log in
Request account
Pages for logged out editors
learn more
Contributions
Talk
Editing
API:EPrints/Plugin
Page
Discussion
British English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
<!-- Pod2Wiki=_preamble_ This page has been automatically generated from the EPrints 3.2 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' comments will be lost. -->{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/Plugin.pm|package_name=EPrints::Plugin}}[[Category:API|PLUGIN]][[Category:API:EPrints/Plugin|PLUGIN]]<div><!-- Edit below this comment --> <!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name --> ==NAME== EPrints::Plugin - base class of all EPrints Plugins <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_synopsis --> ==SYNOPSIS== <source lang="perl">$plugin = $repo->plugin( "Export::XML" );</source> <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_description --> ==DESCRIPTION== This class provides the basic methods used by all EPrints Plugins. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_methods --> ==METHODS== <!-- Pod2Wiki=head_new --> ===new=== <source lang="perl">$plugin = EPrints::Plugin->new( %params ); </source> Create a new instance of a plugin. Defines the following parameters: * repository : Required handle to the current repository object. * name : Human-readable name of the plugin. * alias : Array reference of plugin id's that this plugin is aliasing (replacing). <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_mime_type --> ===mime_type=== <source lang="perl">$mime_type = EPrints::Plugin->mime_type() </source> Returns the MIME type for this plugin. Returns undef if there is no relevant MIME type for this plugin type. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_local_uri --> ===local_uri=== <source lang="perl">$value = EPrints::Plugin->local_uri </source> Return a unique ID for this plugin as it relates to the current repository. This can be used to distinguish that XML import for different repositories may have minor differences. This URL will not resolve to anything useful. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_global_uri --> ===global_uri=== <source lang="perl">$value = EPrints::Plugin->global_uri </source> Return a unique ID for this plugin, but not just in this repository but for any repository. This can be used for fuzzier tools which do not care about the minor differences between EPrints repositories. This URL will not resolve to anything useful. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_id --> ===id=== <source lang="perl">$id = $plugin->id </source> Return the ID of this plugin. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_name --> ===name=== <source lang="perl">$name = $plugin->name </source> Return the ID of this plugin. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_type --> ===type=== <source lang="perl">$name = $plugin->type </source> Return the type of this plugin. eg. Export <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_subtype --> ===subtype=== <source lang="perl">$name = $plugin->subtype </source> Return the sub-type of this plugin. eg. BibTex This is the ID with the type stripped from the front. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_error_message --> ===error_message=== <source lang="perl">$msg = $plugin->error_message </source> Return the error message, if this plugin can't be used. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_broken --> ===broken=== <source lang="perl">$boolean = $plugin->broken </source> Return the value of a parameter in the current plugin. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_matches --> ===matches=== <source lang="perl">$name = $plugin->matches( $test, $param ) </source> Return true if this plugin matches the test, false otherwise. If the test is not known then return false. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_param --> ===param=== <source lang="perl">$value = $plugin->param( $paramid ) </source> Return the parameter with the given id. This uses the hard wired parameter unless an override has been configured for this repository: <pre> $c->{plugins}->{"Export::XML"}->{params}->{name} = "My EP3 XML"; $c->{plugins}->{"Export::Ids"}->{params}->{disable} = 1;</pre> <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_html_phrase_id --> ===html_phrase_id=== <source lang="perl">$phraseid = $plugin->html_phrase_id( $id ) </source> Returns the fully-qualified phrase identifier for the $id phrase for this plugin. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_html_phrase --> ===html_phrase=== <source lang="perl">$xhtml = $plugin->html_phrase( $id, %bits ) </source> Return the phrase belonging to this plugin, with the given id. Returns a DOM tree. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_phrase --> ===phrase=== <source lang="perl">$utf8 = $plugin->phrase( $id, %bits ) </source> Return the phrase belonging to this plugin, with the given id. Returns a utf-8 encoded string. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_copyright --> ==COPYRIGHT== Copyright 2000-2011 University of Southampton. This file is part of EPrints http://www.eprints.org/. EPrints is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. EPrints is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with EPrints. If not, see http://www.gnu.org/licenses/. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=_postamble_ --> <!-- Edit below this comment -->
Summary:
Please note that all contributions to EPrints Documentation may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
EPrints Documentation:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:API
(
edit
)
Template:API:Source
(
edit
)
Template:Pod2Wiki
(
edit
)
Template:RefLinks
(
edit
)