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

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

Inheritance diagram for Template:
Entry_Template Field_Template View_Template Entry_Legacy_Template Entry_List_Template Entry_Table_Template Field_CSV_Template Field_HTML_Template View_Legacy_Template View_List_Template View_Table_Template

Public Member Functions

 __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 split_slug ( $slug, $name=null)
 Get a directory part and a full slug+name (file) components. More...
 

Data Fields

 $located_template = ''
 

Static Private Attributes

static $data_stack = array()
 

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 Template abstract class.

Stores information on where a template to render an object is, and other metadata.

Definition at line 24 of file class-gv-template.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

General template initialization.

Sets the $plugin_directory field.

Set plugin directory.

Definition at line 41 of file class-gv-template.php.

References gravityview().

◆ __destruct()

__destruct ( )

Disallow any cleanup for fear of loss of global data.

The destructor in Gamajo 1.3.0 destroys all of $wp_query. This has the chance of inappropriately destroying valid data that's been stored under the same key.

Disallow this.

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

Member Function Documentation

◆ pop_template_data()

pop_template_data (   $var_name = 'data')

Restore the template data from the stack.

Parameters
string$var_nameThe data variable identifier (Default: "data")
See also
::set_template_data
::pop_template_data
Returns
$this;

Definition at line 115 of file class-gv-template.php.

◆ push_template_data()

push_template_data (   $data,
  $var_name = 'data' 
)

Push the current template data down the stack and set.

This allows us to use the same variable in the template scope without destroying data under the same variable in a nested or parallel template.

Parameters
mixed$dataThe data to set.
string$var_nameThe data variable identifier (Default: "data")
See also
::set_template_data
::pop_template_data
Returns
The current instance.

Definition at line 89 of file class-gv-template.php.

◆ split_slug()

static split_slug (   $slug,
  $name = null 
)
static

Get a directory part and a full slug+name (file) components.

Parameters
string$slugThe slug, template base.
string$nameThe name, template part. Default: null
Returns
array containing slug directory and slug+name.

Definition at line 66 of file class-gv-template.php.

References $name.

Field Documentation

◆ $data_stack

$data_stack = array()
staticprivate

Definition at line 29 of file class-gv-template.php.

◆ $located_template

$located_template = ''

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


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