GravityView  2.1.1
The best, easiest way to display Gravity Forms entries on your website.
Public Member Functions | Data Fields | Static Public Attributes | Protected Attributes
Entry_Template Class Reference

If this file is called directly, abort. More...

Inheritance diagram for Entry_Template:
Template Entry_Legacy_Template Entry_List_Template Entry_Table_Template

Public Member Functions

 __construct (Entry $entry, View $view, Request $request)
 Initializer. More...
 
 __destruct ()
 
 add_id_specific_templates ( $templates, $slug, $name)
 Enable granular template overrides based on current post, view, form, etc. More...
 
 get_back_label ( $do_replace=true)
 Fetch the back link label for an entry context. More...
 
 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...
 

Data Fields

 $entry
 
 $request
 
 $view
 
- Data Fields inherited from Template
 $located_template = ''
 

Static Public Attributes

static $slug
 

Protected Attributes

 $filter_prefix = 'gravityview/template/entries'
 
 $plugin_template_directory = 'templates/entries/'
 
 $theme_template_directory = 'gravityview/entries/'
 

Additional Inherited Members

- 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...
 

Detailed Description

If this file is called directly, abort.

Load up the Gamajo Template Loader.

See also
https://github.com/GaryJones/Gamajo-Template-Loader The Entry Template class .

Renders a using a .

Definition at line 23 of file class-gv-template-entry.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( Entry  $entry,
View  $view,
Request  $request 
)

Initializer.

Parameters
\GV\View$viewThe View connected to this template.
\GV\Entry_Collection$entriesA collection of entries for this view.
\GV\Request$requestThe request context.

Add granular overrides.

Definition at line 69 of file class-gv-template-entry.php.

References $entry.

◆ __destruct()

__destruct ( )

Definition at line 80 of file class-gv-template-entry.php.

Member Function Documentation

◆ add_id_specific_templates()

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
See also
Gamajo_Template_Loader::get_template_file_names() Where the filter is
Parameters
array$templatesExisting list of templates.
string$slugName of the template base, example: table, list, datatables, map
string$nameName of the template part, example: body, footer, head, single
Returns
array $templates Modified template array, merged with existing $templates values

Definition at line 107 of file class-gv-template-entry.php.

References $name, $post, and $templates.

◆ get_back_label()

get_back_label (   $do_replace = true)

Fetch the back link label for an entry context.

Parameters
boolean$do_replaceWhether to perform merge tag replacements, etc.
See also
gravityview/template/links/back/label filter
Returns
string The link label

Definition at line 165 of file class-gv-template-entry.php.

References GV\get(), gravityview(), and GravityView_API\replace_variables().

◆ render()

render ( )

Output some HTML.

Returns
void

Make various pieces of data available to the template under the $gravityview scoped variable.

Runs Filter:
gravityview/template/entry/context
Parameters
\GV\Template_Context$contextThe context for this template.
\GV\Entry_Template$templateThe current template.
Since
2.0

Load the template.

Definition at line 137 of file class-gv-template-entry.php.

Field Documentation

◆ $entry

$entry

Definition at line 45 of file class-gv-template-entry.php.

◆ $filter_prefix

$filter_prefix = 'gravityview/template/entries'
protected

Definition at line 28 of file class-gv-template-entry.php.

◆ $plugin_template_directory

$plugin_template_directory = 'templates/entries/'
protected

Definition at line 40 of file class-gv-template-entry.php.

◆ $request

$request

Definition at line 55 of file class-gv-template-entry.php.

◆ $slug

$slug
static

Definition at line 60 of file class-gv-template-entry.php.

◆ $theme_template_directory

$theme_template_directory = 'gravityview/entries/'
protected

Definition at line 34 of file class-gv-template-entry.php.

◆ $view

$view

Definition at line 50 of file class-gv-template-entry.php.


The documentation for this class was generated from the following file: