Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
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
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
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment