Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
219
Merge Requests
219
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
0a0e884e
Commit
0a0e884e
authored
Apr 04, 2015
by
alexpott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2465031
by damiankloip: Do not allow UUID field to be click sortable
parent
56bf9226
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
core/modules/views/src/EntityViewsData.php
core/modules/views/src/EntityViewsData.php
+17
-0
core/modules/views/tests/src/Unit/EntityViewsDataTest.php
core/modules/views/tests/src/Unit/EntityViewsDataTest.php
+1
-0
No files found.
core/modules/views/src/EntityViewsData.php
View file @
0a0e884e
...
...
@@ -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.
*
...
...
core/modules/views/tests/src/Unit/EntityViewsDataTest.php
View file @
0a0e884e
...
...
@@ -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'
]);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment