public function DefaultEntityProcessorForm::formatExpire in Feeds 8.3
Formats UNIX timestamps to readable strings.
Parameters
int $timestamp: A UNIX timestamp.
Return value
string A string in the format, "After (time)" or "Never."
File
- src/
Feeds/ Processor/ Form/ DefaultEntityProcessorForm.php, line 222
Class
- DefaultEntityProcessorForm
- The configuration form for the CSV parser.
Namespace
Drupal\feeds\Feeds\Processor\FormCode
public function formatExpire($timestamp) {
if ($timestamp == ProcessorInterface::EXPIRE_NEVER) {
return $this
->t('Never');
}
return $this
->t('after @time', [
'@time' => \Drupal::service('date.formatter')
->formatInterval($timestamp),
]);
}