Difference between revisions of "Document fields automatic.pl"
(Created page with '{{dirs}} {{cfgd}} This file contains the set_document_fields_automatic function. You use this function to perform at set of actions which you want to happen automatically before…') |
|||
Line 5: | Line 5: | ||
==Example== | ==Example== | ||
+ | <pre> | ||
+ | $c->{set_document_defaults} = sub | ||
+ | { | ||
+ | my( $data, $session, $eprint ) = @_; | ||
+ | |||
+ | $data->{language} = $session->get_langid(); | ||
+ | $data->{security} = "public"; | ||
+ | }; | ||
+ | </pre> |
Revision as of 14:32, 18 August 2010
EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects
This file contains the set_document_fields_automatic function. You use this function to perform at set of actions which you want to happen automatically before the Document as part of the Document commit() step, in which the document is written to the database.
Example
$c->{set_document_defaults} = sub { my( $data, $session, $eprint ) = @_; $data->{language} = $session->get_langid(); $data->{security} = "public"; };