Commit 0a0e884e authored by alexpott's avatar alexpott

Issue #2465031 by damiankloip: Do not allow UUID field to be click sortable

parent 56bf9226
......@@ -491,6 +491,23 @@ protected function processViewsDataForTextLong($table, FieldDefinitionInterface
}
}
/**
* Processes the views data for a UUID field.
*
* @param string $table
* The table the field is added to.
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* The field definition.
* @param array $views_field
* The views field data.
* @param string $field_column_name
* The field column being processed.
*/
protected function processViewsDataForUuid($table, FieldDefinitionInterface $field_definition, array &$views_field, $field_column_name) {
// It does not make sense for UUID fields to be click sortable.
$views_field['field']['click sortable'] = FALSE;
}
/**
* Gets the table of an entity type to be used as base table in views.
*
......
......@@ -766,6 +766,7 @@ protected function assertLongTextField($data, $field_name) {
protected function assertUuidField($data) {
// @todo Can we provide additional support for UUIDs in views?
$this->assertEquals('field', $data['field']['id']);
$this->assertFalse($data['field']['click sortable']);
$this->assertEquals('string', $data['filter']['id']);
$this->assertEquals('string', $data['argument']['id']);
$this->assertEquals('standard', $data['sort']['id']);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment