Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
drupal.org
better_exposed_filters
Commits
265a39bf
Commit
265a39bf
authored
Feb 03, 2021
by
lamp5
Committed by
Neslee Canil Pinto
Feb 03, 2021
Browse files
Issue #3196004 by lamp5: Allow date filter fields to use a hidden widget
parent
2666f31c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
src/Plugin/better_exposed_filters/filter/Hidden.php
src/Plugin/better_exposed_filters/filter/Hidden.php
+13
-0
No files found.
src/Plugin/better_exposed_filters/filter/Hidden.php
View file @
265a39bf
...
...
@@ -37,4 +37,17 @@ class Hidden extends FilterWidgetBase {
}
}
/**
* {@inheritdoc}
*/
public
static
function
isApplicable
(
$filter
=
NULL
,
array
$filter_options
=
[])
{
$is_applicable
=
parent
::
isApplicable
(
$filter
,
$filter_options
);
if
((
is_a
(
$filter
,
'Drupal\views\Plugin\views\filter\Date'
)
||
!
empty
(
$filter
->
date_handler
))
&&
!
$filter
->
isAGroup
())
{
$is_applicable
=
TRUE
;
}
return
$is_applicable
;
}
}
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