Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
404b90be
There was an error fetching the commit references. Please try again later.
Commit
404b90be
authored
May 16, 2012
by
Daniel Wehner
Committed by
Tim Plunkett
Oct 22, 2012
Browse files
Options
Downloads
Patches
Plain Diff
Document some methods on the view object.
parent
f254213a
No related branches found
No related tags found
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
includes/view.inc
+35
-3
35 additions, 3 deletions
includes/view.inc
with
35 additions
and
3 deletions
includes/view.inc
+
35
−
3
View file @
404b90be
...
...
@@ -1036,6 +1036,10 @@ function build($display_id = NULL) {
/**
* Internal method to build an individual set of handlers.
*
* @param string $key
* The type of handlers (filter etc.) which should be iterated over to
* build the relationship and query information.
*/
function
_build
(
$key
)
{
$handlers
=
&
$this
->
$key
;
...
...
@@ -1057,6 +1061,13 @@ function _build($key) {
/**
* Execute the view's query.
*
* @param string $display_id
* The machine name of the display, which should be executed.
*
* @return bool
* Return whether the executing was successful, for example an argument
* could stop the process.
*/
function
execute
(
$display_id
=
NULL
)
{
if
(
empty
(
$this
->
built
))
{
...
...
@@ -1113,7 +1124,16 @@ function execute($display_id = NULL) {
}
/**
* Render this view for display.
* Render this view for a certain display.
*
* Note: You should better use just the preview function if you want to
* render a view.
*
* @param string $display_id
* The machine name of the display, which should be rendered.
*
* @return (string|NULL)
* Return the output of the rendered view or NULL if something failed in the process.
*/
function
render
(
$display_id
=
NULL
)
{
$this
->
execute
(
$display_id
);
...
...
@@ -1227,7 +1247,19 @@ function render($display_id = NULL) {
}
/**
* Render a specific field via the field ID and the row #.
* Render a specific field via the field ID and the row #
*
* Note: You might want to use views_plugin_style::render_fields as it
* caches the output for you.
*
* @param string $field
* The id of the field to be rendered.
*
* @param int $row
* The row number in the $view->result which is used for the rendering.
*
* @return string
* The rendered output of the field.
*/
function
render_field
(
$field
,
$row
)
{
if
(
isset
(
$this
->
field
[
$field
])
&&
isset
(
$this
->
result
[
$row
]))
{
...
...
@@ -1590,7 +1622,7 @@ function get_breadcrumb($set = FALSE) {
$title
=
t
(
'Home'
);
}
if
(
$title
)
{
$breadcrumb
[]
=
l
(
$title
,
$path
,
array
(
'html'
=>
true
));
$breadcrumb
[]
=
l
(
$title
,
$path
,
array
(
'html'
=>
TRUE
));
}
}
...
...
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