Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
0a0e884e
Commit
0a0e884e
authored
Apr 3, 2015
by
Alex Pott
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2465031
by damiankloip: Do not allow UUID field to be click sortable
parent
56bf9226
No related branches found
No related tags found
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/modules/views/src/EntityViewsData.php
+17
-0
17 additions, 0 deletions
core/modules/views/src/EntityViewsData.php
core/modules/views/tests/src/Unit/EntityViewsDataTest.php
+1
-0
1 addition, 0 deletions
core/modules/views/tests/src/Unit/EntityViewsDataTest.php
with
18 additions
and
0 deletions
core/modules/views/src/EntityViewsData.php
+
17
−
0
View file @
0a0e884e
...
@@ -491,6 +491,23 @@ protected function processViewsDataForTextLong($table, FieldDefinitionInterface
...
@@ -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.
* Gets the table of an entity type to be used as base table in views.
*
*
...
...
This diff is collapsed.
Click to expand it.
core/modules/views/tests/src/Unit/EntityViewsDataTest.php
+
1
−
0
View file @
0a0e884e
...
@@ -766,6 +766,7 @@ protected function assertLongTextField($data, $field_name) {
...
@@ -766,6 +766,7 @@ protected function assertLongTextField($data, $field_name) {
protected
function
assertUuidField
(
$data
)
{
protected
function
assertUuidField
(
$data
)
{
// @todo Can we provide additional support for UUIDs in views?
// @todo Can we provide additional support for UUIDs in views?
$this
->
assertEquals
(
'field'
,
$data
[
'field'
][
'id'
]);
$this
->
assertEquals
(
'field'
,
$data
[
'field'
][
'id'
]);
$this
->
assertFalse
(
$data
[
'field'
][
'click sortable'
]);
$this
->
assertEquals
(
'string'
,
$data
[
'filter'
][
'id'
]);
$this
->
assertEquals
(
'string'
,
$data
[
'filter'
][
'id'
]);
$this
->
assertEquals
(
'string'
,
$data
[
'argument'
][
'id'
]);
$this
->
assertEquals
(
'string'
,
$data
[
'argument'
][
'id'
]);
$this
->
assertEquals
(
'standard'
,
$data
[
'sort'
][
'id'
]);
$this
->
assertEquals
(
'standard'
,
$data
[
'sort'
][
'id'
]);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment