Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3338541
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3338541
Commits
f49ab97e
Commit
f49ab97e
authored
12 years ago
by
Jess
Committed by
Tim Plunkett
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#1808756
by xjm: Update API documentation for substitutions hooks.
parent
6f5ecede
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
views.api.php
+11
-12
11 additions, 12 deletions
views.api.php
with
11 additions
and
12 deletions
views.api.php
+
11
−
12
View file @
f49ab97e
...
...
@@ -390,16 +390,16 @@ function hook_views_data_alter(array &$data) {
}
/**
*
Performs replacement
s in the query before
being perform
ed.
*
Replace special string
s in the query before
it is execut
ed.
*
* @param $view
* @param
ViewExecutable
$view
* The View being executed.
* @return
* An a
rray with keys being the
string
s
to replace, and the
values the strings
*
to replace them with
. The strings to replace are ofte
d surrounded with
* '***', as illustrated in the example implementation.
* @return
array
* An a
ssociative array where each key is a
string to
be
replace
d
, and the
*
corresponding value is its replacement
. The strings to replace are ofte
n
*
surrounded with
'***', as illustrated in the example implementation.
*/
function
hook_views_query_substitutions
(
$view
)
{
function
hook_views_query_substitutions
(
ViewExecutable
$view
)
{
// Example from views_views_query_substitutions().
return
array
(
'***CURRENT_VERSION***'
=>
VERSION
,
...
...
@@ -410,12 +410,11 @@ function hook_views_query_substitutions($view) {
}
/**
* This hook is called to get a list of placeholders and their substitutions,
* used when preprocessing a View with form elements.
* Replace special strings when processing a view with form elements.
*
* @return
* An a
rray with keys being the
string
s
to replace, and the
values the strings
*
to replace them with
.
* @return
array
* An a
ssociative array where each key is a
string to
be
replace
d
, and the
*
corresponding value is its replacement
.
*/
function
hook_views_form_substitutions
()
{
return
array
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment