GV\Entry_Template
The Entry Template class .
Renders a \GV\Entry using a \GV\Entry_Renderer.
Source: future/includes/class-gv-template-entry.php:23
Details
- Kind:
class - Namespace:
GV - Extends:
Template
Properties
| Property | Type | Description |
|---|---|---|
$filter_prefix | string | Prefix for filter names. |
$theme_template_directory | string | Directory name where custom templates for this plugin should be found in the theme. |
$plugin_template_directory | string | Directory name where the default templates for this plugin are found. |
$entry | \GV\Entry | The entry that need to be rendered. |
$view | \GV\View | The view context. |
$request | \GV\Request | The request context. |
$slug | string | The template slug to be loaded (like "table", "list") |
Methods
| Method | Description |
|---|---|
__construct() | Initializer. |
add_id_specific_templates() | Enable granular template overrides based on current post, view, form, etc. |
render() | Output some HTML. |
get_back_label() | Fetch the back link label for an entry context. |
Method Reference
__construct()
public function __construct( Entry $entry, View $view, Request $request )
Initializer.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$entry | Entry | ||
$view | \GV\View | The View connected to this template. | |
$request | \GV\Request | The request context. | |
$entries | \GV\Entry_Collection | A collection of entries for this view. |
Source: future/includes/class-gv-template-entry.php:72
add_id_specific_templates()
public function add_id_specific_templates( $templates, $slug, $name )
Enable granular template overrides based on current post, view, form, etc.
The loading order is:
- post-[ID of post or page where view is embedded]-view-[View ID]-entry-[Entry ID]-table-footer.php
- post-[ID of post or page where view is embedded]-entry-[Entry ID]-table-footer.php
- post-[ID of post or page where view is embedded]-view-[View ID]-table-footer.php
- post-[ID of post or page where view is embedded]-table-footer.php
- view-[View ID]-entry-[Entry ID]-table-footer.php
- form-[Form ID]-entry-[Entry ID]-table-footer.php
- view-[View ID]-table-footer.php
- form-[Form ID]-table-footer.php
- entry-[Entry ID]-table-footer.php
- table-footer.php
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$templates | array | Existing list of templates. | |
$slug | string | Name of the template base, example: table, list, datatables, map | |
$name | string | Name of the template part, example: body, footer, head, single |
Returns
array— $templates Modified template array, merged with existing $templates values
See Also
\Gamajo_Template_Loader::get_template_file_names()Where the filter is
Source: future/includes/class-gv-template-entry.php:110
render()
public function render()
Output some HTML.
Returns
void
Source: future/includes/class-gv-template-entry.php:140
get_back_label()
public function get_back_label( $do_replace=true )
Fetch the back link label for an entry context.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$do_replace | boolean | true | Whether to perform merge tag replacements, etc. |
Returns
string— The link label
See Also
\gravityview/template/links/back/label` filter`
Source: future/includes/class-gv-template-entry.php:167