class SearchDateQueryAlterHooks
Hook implementations for search_date_query_alter.
Hierarchy
- class \Drupal\search_date_query_alter\Hook\SearchDateQueryAlterHooks
Expanded class hierarchy of SearchDateQueryAlterHooks
File
-
core/
modules/ search/ tests/ modules/ search_date_query_alter/ src/ Hook/ SearchDateQueryAlterHooks.php, line 13
Namespace
Drupal\search_date_query_alter\HookView source
class SearchDateQueryAlterHooks {
/**
* Implements hook_query_TAG_alter().
*
* Tags search_$type with $type node_search.
*/
public function querySearchNodeSearchAlter(AlterableInterface $query) : void {
// Start date Sat, 19 Mar 2016 00:00:00 GMT.
$query->condition('n.created', 1458345600, '>=');
// End date Sun, 20 Mar 2016 00:00:00 GMT.
$query->condition('n.created', 1458432000, '<');
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
SearchDateQueryAlterHooks::querySearchNodeSearchAlter | public | function | Implements hook_query_TAG_alter(). |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.