public function defaultLabel() {
$created = \Drupal::service('date.formatter')
->format($this
->get('created')->value);
switch ($this->type->value) {
case 'error':
return t('Error message from @time', array(
'@time' => $created,
));
case 'status':
return t('Status message from @time', array(
'@time' => $created,
));
case 'warning':
return t('Warning message from @time', array(
'@time' => $created,
));
case 'debug':
return t('Debug message from @time', array(
'@time' => $created,
));
}
}