sorting by date-and-time in activities view
Also removed date format thing from hook_update_n as not needed
This commit is contained in:
parent
18a0846348
commit
be45fd2d42
@ -384,7 +384,21 @@ display:
|
||||
entity_type: oc_activity
|
||||
plugin_id: entity_link
|
||||
filters: { }
|
||||
sorts: { }
|
||||
sorts:
|
||||
activity_date_time:
|
||||
id: activity_date_time
|
||||
table: oc_activity_field_data
|
||||
field: activity_date_time
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
order: DESC
|
||||
exposed: false
|
||||
expose:
|
||||
label: ''
|
||||
entity_type: oc_activity
|
||||
entity_field: activity_date_time
|
||||
plugin_id: standard
|
||||
title: 'Activity List'
|
||||
header: { }
|
||||
footer: { }
|
||||
|
@ -1,23 +1,5 @@
|
||||
<?php
|
||||
|
||||
// Change date formats on created and changed dates.
|
||||
function opencase_entities_update_801910() {
|
||||
$update_manager = \Drupal::entityDefinitionUpdateManager();
|
||||
$field = $update_manager->getFieldStorageDefinition('created', 'oc_case');
|
||||
$properties = array(
|
||||
'targetEntityType' => $field->getTargetEntityTypeId(),
|
||||
'bundle' => $field->getTargetBundle()
|
||||
);
|
||||
if ($view_displays = \Drupal::entityTypeManager()->getStorage('entity_view_display')->loadByProperties($properties)) {
|
||||
foreach ($view_displays as $view_display) {
|
||||
$view_display->setComponent('created', array(
|
||||
'type' => 'datetime_default',
|
||||
'settings' => ['format_type' => 'short'],
|
||||
) + $component)->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Make contact details revisionable.
|
||||
function opencase_entities_update_80191() {
|
||||
$update_manager = \Drupal::entityDefinitionUpdateManager();
|
||||
@ -30,9 +12,6 @@ function opencase_entities_update_80191() {
|
||||
|
||||
use \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchemaConverter;
|
||||
|
||||
/**
|
||||
* Update my_entity to be revisionable.
|
||||
*/
|
||||
function opencase_entities_update_8019(&$sandbox) {
|
||||
$schema_converter = new SqlContentEntityStorageSchemaConverter(
|
||||
'oc_actor',
|
||||
|
Reference in New Issue
Block a user