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/Screen
(section)
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!
==METHODS== <!-- Pod2Wiki=head_properties_from --> ===properties_from=== <source lang="perl">$screen->properties_from() </source> Called by the [[API:EPrints/ScreenProcessor|EPrints::ScreenProcessor]] very early in the response process. This method should be used to set up the response by, for example getting CGI query parameters and storing them in the processor object. Because this method is called '''before''' [[API:EPrints/Plugin/Screen#can_be_viewed|can_be_viewed]] no changes to the system should be made here. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_redirect_to_me_url --> ===redirect_to_me_url=== <source lang="perl">$url = $screen->redirect_to_me_url() </source> If the request is a POST the screen is given an opportunity to redirect the user, avoiding double-POSTs if the user reloads the resulting page. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_render --> ===render=== <source lang="perl">$xhtml = $screen->render() </source> Render the page body. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_render_links --> ===render_links=== <source lang="perl">$xhtml = $screen->render_links() </source> Render any elements for the page <head> section. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_hidden_bits --> ===hidden_bits=== <source lang="perl">@params = $screen->hidden_bits() </source> Returns a key-value list of values that must be set when referring to this screen. At the top-level this is just the 'screen' id. Historically render_hidden_bits() - which built up a set of hidden inputs in XHTML - was used but this had the downside of not being usable with GET requests. Screen plugins now have a mix of approaches, so care is needed when sub-classing <code>hidden_bits</code>. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_wishes_to_export --> ===wishes_to_export=== <source lang="perl">$bool = $screen->wishes_to_export() </source> If true, instead of calling the render* methods the export* methods will be used. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_export --> ===export=== <source lang="perl">$screen->export() </source> Called when [[API:EPrints/Plugin/Screen#wishes_to_export|wishes_to_export]] is true. This method should generate an HTTP response directly (e.g. by printing to STDOUT). <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_export_mimetype --> ===export_mimetype=== <source lang="perl">$mime_type = $screen->export_mimetype() </source> Return the MIME type of the HTTP response (as will be generated by [[API:EPrints/Plugin/Screen#export|export]]). Default is to use "text/plain". <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_render_form --> ===render_form=== <source lang="perl">$xhtml = $screen->render_form( [ METHOD [, ACTION ] ] ) </source> Render an XHTML form that will call this screen. If the METHOD is POST will apply cross-site request forgery protection. Unless you have a good reason not to you should always use render_form() to add forms to your HTTP response, which ensures the correct context and request protections are in place. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_verify_csrf --> ===verify_csrf=== <source lang="perl">$ok = $screen->verify_csrf() </source> Verify that the CSRF token in the user agent's cookie matches the token passed in the form value. If the CSRF check fails no action should be taken as this may be an attempt to forge a request. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_render_title --> ===render_title=== <source lang="perl">$xhtml = $screen->render_title </source> Render the page title. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_list_items --> ===list_items=== <source lang="perl">@screen_opts = $screen->list_items( $list_id, %opts ) </source> Returns a list of screens that appear in list $list_id ordered by their position. Each screen opt is a hash ref of: <pre> screen - screen plugin screen_id - screen id position - position (positive integer) action - the action, if this plugin is for an action list</pre> Incoming opts: <pre> filter => 1 or 0 (default 1) params => {}</pre> <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_has_action --> ===has_action=== <source lang="perl">$ok = $screen->has_action( $action_id ) </source> Returns true if this screen has an action $action_id. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_action_icon_url --> ===action_icon_url=== <source lang="perl">$url = $screen->action_icon_url( $action ) </source> Returns the relative URL to the $action icon for this screen. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_render_action_link --> ===render_action_link=== <source lang="perl">$frag = $screen->render_action_link() </source> Returns a link to this screen. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_copyright -->
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)