eca-1.0.x-dev/modules/views/eca_views.module
modules/views/eca_views.module
<?php /** * @file * ECA Views submodule. */ use Drupal\eca_views\HookHandler; use Drupal\views\Plugin\views\cache\CachePluginBase; use Drupal\views\Plugin\views\query\QueryPluginBase; use Drupal\views\ViewExecutable; /** * Eca content hook handler. * * @return \Drupal\eca_views\HookHandler * The views hook handler. */ function _eca_views_hook_handler(): HookHandler { return \Drupal::service('eca_views.hook_handler'); } /** * Implements hook_views_query_substitutions(). */ function eca_views_views_query_substitutions(ViewExecutable $view): array { return _eca_views_hook_handler()->querySubstitutions($view); } /** * Implements hook_views_pre_view(). */ function eca_views_views_pre_view(ViewExecutable $view, string $display_id, array &$args): void { _eca_views_hook_handler()->preView($view, $display_id, $args); } /** * Implements hook_views_pre_build(). */ function eca_views_views_pre_build(ViewExecutable $view): void { _eca_views_hook_handler()->preBuild($view); } /** * Implements hook_views_post_build(). */ function eca_views_views_post_build(ViewExecutable $view): void { _eca_views_hook_handler()->postBuild($view); } /** * Implements hook_views_pre_execute(). */ function eca_views_views_pre_execute(ViewExecutable $view): void { _eca_views_hook_handler()->preExecute($view); } /** * Implements hook_views_post_execute(). */ function eca_views_views_post_execute(ViewExecutable $view): void { _eca_views_hook_handler()->postExecute($view); } /** * Implements hook_views_pre_render(). */ function eca_views_views_pre_render(ViewExecutable $view): void { _eca_views_hook_handler()->preRender($view); } /** * Implements hook_views_post_render(). */ function eca_views_views_post_render(ViewExecutable $view, array &$output, CachePluginBase $cache): void { _eca_views_hook_handler()->postRender($view, $output); } /** * Implements hook_views_query_alter(). */ function eca_views_views_query_alter(ViewExecutable $view, QueryPluginBase $query): void { _eca_views_hook_handler()->queryAlter($view, $query); }