Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
d8fd12a7b9 | |||
88b5ce3d2e | |||
c63cae6b71 |
@ -1,5 +1,15 @@
|
|||||||
<?php
|
<?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.
|
* Add 'activity_date_time' field to 'oc_activity' entities.
|
||||||
*/
|
*/
|
||||||
|
@ -86,7 +86,6 @@ class OCActivity extends RevisionableContentEntityBase implements OCActivityInte
|
|||||||
public static function currentDateTime() {
|
public static function currentDateTime() {
|
||||||
$current_time = DrupalDateTime::createFromTimestamp(time());
|
$current_time = DrupalDateTime::createFromTimestamp(time());
|
||||||
$formatted = $current_time->format(DateTimeItem::DATETIME_STORAGE_FORMAT);
|
$formatted = $current_time->format(DateTimeItem::DATETIME_STORAGE_FORMAT);
|
||||||
\Drupal::logger("nr_debug")->notice($formatted);
|
|
||||||
return $formatted;
|
return $formatted;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -2,7 +2,7 @@ name: 'OpenCase'
|
|||||||
type: module
|
type: module
|
||||||
description: 'Simple Case Management'
|
description: 'Simple Case Management'
|
||||||
core: 8.x
|
core: 8.x
|
||||||
version: 8.x-1.6
|
version: 8.x-1.6.1
|
||||||
package: 'OpenCase'
|
package: 'OpenCase'
|
||||||
dependencies:
|
dependencies:
|
||||||
- opencase_entities
|
- opencase_entities
|
||||||
|
Reference in New Issue
Block a user