protected function SmartDate::prepareValues in Smart Date 3.x
Same name and namespace in other branches
- 8.2 src/Feeds/Target/SmartDate.php \Drupal\smart_date\Feeds\Target\SmartDate::prepareValues()
- 3.0.x src/Feeds/Target/SmartDate.php \Drupal\smart_date\Feeds\Target\SmartDate::prepareValues()
- 3.1.x src/Feeds/Target/SmartDate.php \Drupal\smart_date\Feeds\Target\SmartDate::prepareValues()
- 3.2.x src/Feeds/Target/SmartDate.php \Drupal\smart_date\Feeds\Target\SmartDate::prepareValues()
- 3.3.x src/Feeds/Target/SmartDate.php \Drupal\smart_date\Feeds\Target\SmartDate::prepareValues()
- 3.4.x src/Feeds/Target/SmartDate.php \Drupal\smart_date\Feeds\Target\SmartDate::prepareValues()
File
- src/
Feeds/ Target/ SmartDate.php, line 48
Class
- SmartDate
- Defines a smartdate field mapper.
Namespace
Drupal\smart_date\Feeds\TargetCode
protected function prepareValues(array $values) {
$return = [];
foreach ($values as $delta => $columns) {
try {
$this
->prepareValue($delta, $columns);
$return[] = $columns;
} catch (EmptyFeedException $e) {
// Nothing wrong here.
} catch (TargetValidationException $e) {
// Validation failed.
\Drupal::messenger()
->addError($e
->getMessage());
}
}
return $return;
}