Open Journal Systems  2.4.8
 All Classes Namespaces Functions Variables Groups Pages
CitationForm Class Reference
Inheritance diagram for CitationForm:

Public Member Functions

 _getStringValueFromMetadataStatement (&$property, &$value)
 _orderByDisplayName ($fieldList)
 CitationForm (&$request, &$citation, &$assocObject)
 execute ()
 fetch ($request, $template=CITATION_FORM_FULL_TEMPLATE)
getAssocObject ()
getCitation ()
 getUnsavedChanges ()
 initData ()
 readInputData ()
 setUnsavedChanges ($unsavedChanges)
 validate ()
- Public Member Functions inherited from Form
 _decomposeArray ($name, $value, $stack)
 addCheck ($formValidator)
 addError ($field, $message)
 addErrorField ($field)
 display ($request=null, $template=null)
 execute ($object=null)
 fetch (&$request, $template=null, $display=false)
 Form ($template=null, $callHooks=true, $requiredLocale=null, $supportedLocales=null)
 getData ($key)
 getDefaultFormLocale ()
 getErrorsArray ()
 getFormLocale ()
 getLocaleFieldNames ()
 getRequiredLocale ()
 getTemplate ()
 initData ()
 isLocaleResubmit ()
 isValid ()
 readInputData ()
 readUserDateVars ($vars)
 readUserVars ($vars)
 setData ($key, $value)
 setTemplate ($template)
 smartyFormLanguageChooser ($params, &$smarty)
 validate ($callHooks=true)

Additional Inherited Members

- Public Attributes inherited from Form

Detailed Description

Form for adding/editing a citation.

Definition at line 21 of file

Member Function Documentation

CitationForm::_getStringValueFromMetadataStatement ( $property,

Take a structured meta-data statement and transform it into a plain text value that can be displayed to the end-user.


Definition at line 521 of file

Referenced by fetch(), and initData().

CitationForm::_orderByDisplayName (   $fieldList)

Alphabetically order the given field list by display name.

$fieldListarray expects an array of entries with a sub-key "displayName".
array the ordered field.

Definition at line 553 of file

Referenced by fetch().

CitationForm::CitationForm ( $request,



Definition at line 47 of file

References Form\addCheck().

CitationForm::execute ( )

Save citation

Definition at line 278 of file

References getCitation(), and DAORegistry\getDAO().

CitationForm::fetch (   $request,

Fetch the form.

$templatestring the template to render the form
string the rendered form

Definition at line 297 of file

References _getStringValueFromMetadataStatement(), _orderByDisplayName(), Form\addError(), String\diff(), getAssocObject(), getCitation(), DAORegistry\getDAO(), Form\getData(), AppLocale\getLocale(), and getUnsavedChanges().

& CitationForm::getAssocObject ( )

Get the object the citation belongs to.


Definition at line 87 of file

Referenced by fetch().

& CitationForm::getCitation ( )

Get the citation


Definition at line 79 of file

Referenced by execute(), fetch(), initData(), and validate().

CitationForm::getUnsavedChanges ( )

Returns true if the form contains unsaved changes, otherwise false.


Definition at line 104 of file

Referenced by fetch().

CitationForm::initData ( )

Initialize form data from the associated citation.

Definition at line 114 of file

References _getStringValueFromMetadataStatement(), getCitation(), and Form\setData().

CitationForm::readInputData ( )

Initialize form data from user submitted data.

Definition at line 150 of file

References Form\readUserVars().

CitationForm::setUnsavedChanges (   $unsavedChanges)

Set true if the form contains unsaved changes.


Definition at line 95 of file

CitationForm::validate ( )

Custom implementation of Form::validate() that validates meta-data form data and injects it into the internal citation object.

NB: The configuration of the internal citation object would normally be done in readInputData(). Validation and injection can easily be done in one step. It therefore avoids code duplication and improves performance to do both here.

Definition at line 167 of file

References Citation\_getSupportedCitationStates(), Form\addError(), Form\addErrorField(), getCitation(), Form\getData(), MetadataDescription\getNamespacedPropertyId(), Form\isValid(), and Form\setData().

The documentation for this class was generated from the following file: