You are here

protected function SmartDate::prepareValue in Smart Date 3.0.x

Same name and namespace in other branches
  1. 8.2 src/Feeds/Target/SmartDate.php \Drupal\smart_date\Feeds\Target\SmartDate::prepareValue()
  2. 3.x src/Feeds/Target/SmartDate.php \Drupal\smart_date\Feeds\Target\SmartDate::prepareValue()
  3. 3.1.x src/Feeds/Target/SmartDate.php \Drupal\smart_date\Feeds\Target\SmartDate::prepareValue()
  4. 3.2.x src/Feeds/Target/SmartDate.php \Drupal\smart_date\Feeds\Target\SmartDate::prepareValue()
  5. 3.3.x src/Feeds/Target/SmartDate.php \Drupal\smart_date\Feeds\Target\SmartDate::prepareValue()
  6. 3.4.x src/Feeds/Target/SmartDate.php \Drupal\smart_date\Feeds\Target\SmartDate::prepareValue()
1 call to SmartDate::prepareValue()
SmartDate::prepareValues in src/Feeds/Target/SmartDate.php

File

src/Feeds/Target/SmartDate.php, line 33

Class

SmartDate
Defines a smartdate field mapper.

Namespace

Drupal\smart_date\Feeds\Target

Code

protected function prepareValue($delta, array &$values) {
  if (isset($values)) {
    if (isset($values['value']) && !isset($values['end_value'])) {
      $values['end_value'] = $values['value'];
    }
    return $values;
  }
  else {
    throw new EmptyFeedException();
  }
}