You are here

function _biblio_feeds_set__simple_target in Bibliography Module 7

Same name and namespace in other branches
  1. 7.2 includes/biblio.feeds.inc \_biblio_feeds_set__simple_target()
1 string reference to '_biblio_feeds_set__simple_target'
_biblio_feeds_processor_targets_alter in includes/biblio.feeds.inc

File

includes/biblio.feeds.inc, line 86

Code

function _biblio_feeds_set__simple_target($source, $entity, $target, $value) {
  if (empty($value)) {
    return;
  }

  // Handle non-multiple value fields.
  if (!is_array($value)) {
    $value = array(
      $value,
    );
  }
  if (isset($value[0]) && !empty($value[0])) {
    $entity->{$target} = $value[0];
    if ($target == 'biblio_abst_e') {
      $entity->biblio_formats[$target] = 'full_html';
    }
  }
}