Skip to content

Add plugin to support MODS metadata standard

yamyyao requested to merge issue/rest_oai_pmh-3248710:3248710-add-mods into 8.x-1.x

Closes #3248710

Provides support for the MODS metadata standard, with mapping pulled from a Drupal view. Twig template is left to be customized by user to suit their specific repository needs.

Premise

To provide support for MODS, we decided to pull mapping information from a view as it allows for easier customization on the user's end. The user would add fields to the view and add a label for the field corresponding to the variable name to be used in the twig template. Paired with instructing the user to modify the twig template for their own needs, it allows for greater flexibility in the exact format of output.

Changes

  • Added plugin for MODS, reading information off of a view provided by user
  • Added section in settings form to allow for user to set their view's machine name and view's display name
  • Modified which PluginBase was being used in OaiMetadataMapBase.php in order to gain access to StringTranslationTrait and the t() function
    • Previously, calls to $this->t() within the OaiMetadataMap plugins resulted in a "Call to undefined method" error
  • Added example view in config/optional to be used with the example twig template mods.html.twig
  • Added information to README.md with information on MODS plugin

Merge request reports

Loading