public function Mapping::getFormatterUpdatedDrupal in GatherContent 8.5
Same name and namespace in other branches
- 8.3 src/Entity/Mapping.php \Drupal\gathercontent\Entity\Mapping::getFormatterUpdatedDrupal()
- 8.4 src/Entity/Mapping.php \Drupal\gathercontent\Entity\Mapping::getFormatterUpdatedDrupal()
Formatter for updated drupal property.
Return value
string If not empty return formatted date, else return string Never.
Overrides MappingInterface::getFormatterUpdatedDrupal
File
- src/
Entity/ Mapping.php, line 276
Class
- Mapping
- Defines the GatherContent Mapping entity.
Namespace
Drupal\gathercontent\EntityCode
public function getFormatterUpdatedDrupal() {
$updated_drupal = $this
->get('updated_drupal');
if (!empty($updated_drupal)) {
return \Drupal::service('date.formatter')
->format($updated_drupal, 'custom', 'M d, Y - H:i');
}
else {
return $this
->t('Never');
}
}