GravityView
2.17
The best, easiest way to display Gravity Forms entries on your website.
|
If this file is called directly, abort. More...
Public Member Functions | |
__construct (Field $field, View $view=null, Source $source=null, Entry $entry=null, Request $request=null) | |
Initializer. More... | |
__destruct () | |
render () | |
Output some HTML. More... | |
Public Member Functions inherited from Template | |
__construct () | |
General template initialization. More... | |
__destruct () | |
Disallow any cleanup for fear of loss of global data. More... | |
pop_template_data ( $var_name='data') | |
Restore the template data from the stack. More... | |
push_template_data ( $data, $var_name='data') | |
Push the current template data down the stack and set. More... | |
Static Public Member Functions | |
static | add_id_specific_templates ( $template) |
Enable granular template overrides based on current post, view, form, field types, etc. More... | |
Static Public Member Functions inherited from Template | |
static | split_slug ( $slug, $name=null) |
Get a directory part and a full slug+name (file) components. More... | |
Data Fields | |
$entry | |
$field | |
$request | |
$source | |
$view | |
Data Fields inherited from Template | |
$located_template = '' | |
Static Public Attributes | |
static | $slug |
Protected Attributes | |
$filter_prefix = 'gravityview/template/fields' | |
$plugin_template_directory = 'templates/fields/' | |
$theme_template_directory = 'gravityview/fields/' | |
If this file is called directly, abort.
Load up the Gamajo Template Loader.
Attached to a and used by a .
Definition at line 23 of file class-gv-template-field.php.
__construct | ( | Field | $field, |
View | $view = null , |
||
Source | $source = null , |
||
Entry | $entry = null , |
||
Request | $request = null |
||
) |
Initializer.
\GV\Field | $field | The field about to be rendered. |
\GV\View | $view | The view in this context, if applicable. |
\GV\Source | $source | The source (form) in this context, if applicable. |
\GV\Entry | $entry | The entry in this context, if applicable. |
\GV\Request | $request | The request in this context, if applicable. |
Add granular overrides.
Definition at line 81 of file class-gv-template-field.php.
__destruct | ( | ) |
Definition at line 94 of file class-gv-template-field.php.
|
static |
Enable granular template overrides based on current post, view, form, field types, etc.
Why? See https://github.com/gravityview/GravityView/issues/1024
\GV\Field_Template | $template | The template instance. |
get_template_part
. See \GV\Field_Template::__construct
Enable granular template overrides based on current post, view, form, field types, etc.
The hierarchy is as follows:
array | $templates | Existing list of templates. |
string | $slug | Name of the template base, example: html , json , xml |
string | $name | Name of the template part. |
Field-specific
Generic field templates
Legacy. Ignore some types that conflict.
Definition at line 106 of file class-gv-template-field.php.
References $class, $field_id, $form_id, $name, $post, $template, $templates, and $view_id.
render | ( | ) |
Output some HTML.
Retrieve the value.
Alter the display value according to Gravity Forms.
Prevent any PHP warnings that may be generated.
Call the Gravity Forms field value filter.
Replace merge tags for admin-only fields.
Make various pieces of data available to the template under the $gravityview scoped variable.
gravityview/template/field/context
\GV\Template_Context | $context | The context for this template. |
Bake the template.
gravityview_empty_value
What to display when a field is empty string | $value | (empty string) |
gravityview/field/value/empty
What to display when this field is empty. string | $value | The value to display (Default: empty string) |
Definition at line 256 of file class-gv-template-field.php.
References $display_value, $entry, $field, $gf_field, $link_atts, $output, $value, gravityview(), gravityview_get_link(), gv_empty(), Legacy_Context\load(), and GravityView_API\replace_variables().
$entry |
Definition at line 60 of file class-gv-template-field.php.
$field |
Definition at line 45 of file class-gv-template-field.php.
|
protected |
Definition at line 28 of file class-gv-template-field.php.
|
protected |
Definition at line 40 of file class-gv-template-field.php.
$request |
Definition at line 65 of file class-gv-template-field.php.
|
static |
Definition at line 70 of file class-gv-template-field.php.
$source |
Definition at line 55 of file class-gv-template-field.php.
|
protected |
Definition at line 34 of file class-gv-template-field.php.
$view |
Definition at line 50 of file class-gv-template-field.php.