Replace special strings in the query before it is executed.
\Drupal\views\ViewExecutable $view: The View being executed.
array An associative array where each key is a string to be replaced, and the corresponding value is its replacement. The strings to replace are often surrounded with '***', as illustrated in the example implementation.
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
function hook_views_query_substitutions(ViewExecutable $view) {
// Example from views_views_query_substitutions().
return array(
'***CURRENT_VERSION***' => VERSION,
'***CURRENT_TIME***' => REQUEST_TIME,
'***CURRENT_LANGUAGE***' => language(\Drupal\Core\Language\Language::TYPE_CONTENT)->langcode,
'***DEFAULT_LANGUAGE***' => language_default()->langcode,
);
}