You are here

public function BiblioStyleEndNoteXML8::importYear in Bibliography Module 7.3

Import year and Biblio status.

Parameters

EntityMetadataWrapper $wrapper: The wrapped Biblio object.

$property: The property name to import.

$data: The data to import from.

File

plugins/biblio_style/endnote/BiblioStyleEndNoteXML8.php, line 198
EndNote XML8 biblio style.

Class

BiblioStyleEndNoteXML8
@file EndNote XML8 biblio style.

Code

public function importYear(EntityMetadataWrapper $wrapper, $property, $data) {
  if (is_numeric($data)) {
    $wrapper->biblio_year
      ->set($data);
    return;
  }

  // @todo: Get Biblio status valid options from field.
  $options = array(
    'in_press',
    'submitted',
  );
  $data = str_replace(' ', '_', strtolower($data));
  if (in_array($data, $options)) {
    $wrapper->biblio_status
      ->set($data);
  }
}