Merge branch 'master' of github.com:hoegrammer/opencase
This commit is contained in:
commit
88b5ce3d2e
@ -1,5 +1,15 @@
|
||||
<?php
|
||||
|
||||
function opencase_entities_update_8013() {
|
||||
$update_manager = \Drupal::entityDefinitionUpdateManager();
|
||||
$definition = $update_manager->getFieldStorageDefinition('activity_date_time', 'oc_activity');
|
||||
// $definition->setDescription('');
|
||||
// $definition->setRequired('');
|
||||
//->setDefaultValueCallback('Drupal\opencase_entities\Entity\OCActivity::currentDateTime')
|
||||
$update_manager->updateFieldStorageDefinition($definition);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add 'activity_date_time' field to 'oc_activity' entities.
|
||||
*/
|
||||
|
@ -86,7 +86,6 @@ class OCActivity extends RevisionableContentEntityBase implements OCActivityInte
|
||||
public static function currentDateTime() {
|
||||
$current_time = DrupalDateTime::createFromTimestamp(time());
|
||||
$formatted = $current_time->format(DateTimeItem::DATETIME_STORAGE_FORMAT);
|
||||
\Drupal::logger("nr_debug")->notice($formatted);
|
||||
return $formatted;
|
||||
}
|
||||
/**
|
||||
|
Reference in New Issue
Block a user