Changed max length of full name, and some other things
This commit is contained in:
@ -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,
|
||||
])
|
||||
|
Reference in New Issue
Block a user