You are here

public function BiblioStyleEndNoteXML8::importGeneric in Bibliography Module 7.3

Import generic property.

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 178
EndNote XML8 biblio style.

Class

BiblioStyleEndNoteXML8
@file EndNote XML8 biblio style.

Code

public function importGeneric(EntityMetadataWrapper $wrapper, $property, $data) {

  // @todo: Make more generic + configurable?
  if (!isset($wrapper->{$property})) {

    // Create field.
    biblio_create_field($property, 'biblio', $wrapper
      ->getBundle());
  }
  $value = $wrapper->{$property}
    ->value() . $data;
  $wrapper->{$property}
    ->set($value);
}