Changed max length of full name, and some other things

This commit is contained in:
2021-02-08 21:28:15 +00:00
parent 9646e216aa
commit 7a995060ce
6 changed files with 16 additions and 7 deletions

View File

@ -85,7 +85,8 @@ class OCActivity extends RevisionableContentEntityBase implements OCActivityInte
public static function currentDateTime() {
$current_time = DrupalDateTime::createFromTimestamp(time());
$formatted = $current_time->format(DateTimeItem::DATETIME_STORAGE_FORMAT);
$formatted = $current_time->format('Y-m-d');
error_log($formatted);
return $formatted;
}
/**
@ -222,11 +223,16 @@ class OCActivity extends RevisionableContentEntityBase implements OCActivityInte
->setRevisionable(TRUE)
->setRequired(TRUE)
->setDefaultValueCallback('\Drupal\opencase_entities\Entity\OCActivity::currentDateTime')
->setDisplayConfigurable('form', true)
->setDisplayConfigurable('view', true)
->setSettings([
'datetime_type' => 'date'
])
->setDisplayOptions('view', [
'label' => 'above',
'type' => 'datetime_default',
'settings' => [
'format_type' => 'medium',
'format_type' => 'short',
],
'weight' => -3,
])