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

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

Inheritance diagram for View_Table_Template:
View_Template Template

Public Member Functions

 __construct (View $view, Entry_Collection $entries, Request $request)
 Constructor. More...
 
 the_columns ()
 Output the table column names. More...
 
 the_entry (\GV\Entry $entry, $attributes)
 Output the entry row. More...
 
 the_field (\GV\Field $field, \GV\Entry $entry)
 Output a field cell. More...
 
- Public Member Functions inherited from View_Template
 __construct (View $view, Entry_Collection $entries, Request $request)
 Initializer. More...
 
 __destruct ()
 
 add_id_specific_templates ( $templates, $slug, $name)
 Enable granular template overrides based on current post, view, form, etc. 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...
 

Static Public Member Functions

static add_columns_sort_links ( $column_label, $context=null)
 Add sorting links to HTML columns that support sorting. More...
 
static body_after ( $context)
 gravityview_table_body_after and gravityview/template/table/body/after actions. More...
 
static body_before ( $context)
 gravityview_table_body_before and gravityview/template/table/body/before actions. More...
 
static entry_class ( $class, $entry, $context)
 gravityview_entry_class and gravityview/template/table/entry/class filters. More...
 
static tr_after ( $context)
 gravityview_table_tr_after and gravityview/template/table/tr/after actions. More...
 
static tr_before ( $context)
 gravityview_table_tr_before and gravityview/template/table/tr/after actions. 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...
 

Static Public Attributes

static $slug = 'table'
 
- Static Public Attributes inherited from View_Template
static $slug
 

Static Protected Member Functions

static get_field_column_label ( $field, $context=null)
 Returns the label for a column, with support for all deprecated filters. More...
 

Additional Inherited Members

- Data Fields inherited from View_Template
 $entries
 
 $request
 
 $view
 
- Data Fields inherited from Template
 $located_template = ''
 
- Protected Attributes inherited from View_Template
 $filter_prefix = 'gravityview/template/views'
 
 $plugin_template_directory = 'templates/views/'
 
 $theme_template_directory = 'gravityview/views/'
 

Detailed Description

If this file is called directly, abort.

The View Table Template class .

Renders a and a via a .

Definition at line 14 of file class-gv-template-view-table.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( View  $view,
Entry_Collection  $entries,
Request  $request 
)

Constructor.

Add filters to modify output.

Since
2.0.4
Parameters
View$view
Entry_Collection$entries
Request$request

Definition at line 30 of file class-gv-template-view-table.php.

Member Function Documentation

◆ add_columns_sort_links()

static add_columns_sort_links (   $column_label,
  $context = null 
)
static

Add sorting links to HTML columns that support sorting.

Since
2.0.4
2.0.5 Made static
Parameters
string$column_labelLabel for the table column
\GV\Template_Context$context
Returns
string

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

References $class, $url, GravityView_frontend\_override_sorting_id_by_field_type(), GravityView_frontend\getInstance(), and GravityView_View\getInstance().

◆ body_after()

static body_after (   $context)
static

gravityview_table_body_after and gravityview/template/table/body/after actions.

Output inside the tbody of the table.

Parameters
$contextThe 2.0 context.
Returns
void
Runs Actions:
gravityview/template/table/body/after Output inside the tbody of the table at the end.
Since
2.0
Parameters
\GV\Template_Context$contextThe template context.
Runs Actions:
gravityview_table_body_after Inside the tbody, after any rows are rendered. Can be used to insert additional rows.
Since
1.0.7
Parameters
\GravityView_View$gravityview_viewCurrent GravityView_View object.

ugh!

Definition at line 318 of file class-gv-template-view-table.php.

References GravityView_View\getInstance().

◆ body_before()

static body_before (   $context)
static

gravityview_table_body_before and gravityview/template/table/body/before actions.

Output inside the tbody of the table.

Parameters
$contextThe 2.0 context.
Returns
void
Runs Actions:
gravityview/template/table/body/before Output inside the tbody of the table.
Since
2.0
Parameters
\GV\Template_Context$contextThe template context.
Runs Actions:
gravityview_table_body_before Inside the tbody, before any rows are rendered. Can be used to insert additional rows.
Since
1.0.7
Parameters
\GravityView_View$gravityview_viewCurrent GravityView_View object.

ugh!

Definition at line 292 of file class-gv-template-view-table.php.

References GravityView_View\getInstance().

◆ entry_class()

static entry_class (   $class,
  $entry,
  $context 
)
static

gravityview_entry_class and gravityview/template/table/entry/class filters.

Modify of the class of a row.

Parameters
string$classThe class.
\GV\Entry$entryThe entry.
Runs Filter:
gravityview_entry_class Modify the class applied to the entry row.
Parameters
string$classExisting class.
array$entryCurrent entry being displayed
\GravityView_View$thisCurrent GravityView_View object
Returns
string The modified class.
Runs Filter:
gravityview/template/table/entry/class Modify the class aplied to the entry row.
Parameters
string$classThe existing class.

Definition at line 398 of file class-gv-template-view-table.php.

References $class, $entry, and GravityView_View\getInstance().

◆ get_field_column_label()

static get_field_column_label (   $field,
  $context = null 
)
staticprotected

Returns the label for a column, with support for all deprecated filters.

Since
2.1
Parameters
\GV\Field$field
\GV\Template_Context$context
Runs Filter:
gravityview/template/field/label Override the field label.
Since
2.0
Parameters
[in,out]string$column_labelThe label to override.
\GV\Template_Context$contextThe context. Does not have entry set here.

Definition at line 123 of file class-gv-template-view-table.php.

References $field, and GV\$form.

◆ the_columns()

the_columns ( )

Output the table column names.

Returns
void

Definition at line 96 of file class-gv-template-view-table.php.

References $field, and gravityview_field_output().

◆ the_entry()

the_entry ( \GV\Entry  $entry,
  $attributes 
)

Output the entry row.

Parameters
\GV\Entry$entryThe entry to be rendered.
array$attributesThe attributes for the

tag

Returns
void

Push legacy entry context.

Runs Filter:
gravityview_table_cells Modify the fields displayed in a table
Parameters
array$fields
\GravityView_View$this
Runs Filter:
gravityview/template/table/fields Modify the fields displayed in this tables.
Parameters
\GV\Field_Collection$fieldsThe fields.
\GV\Template_Context$contextThe context.
Since
2.0
Runs Filter:
gravityview/template/table/entry/row/attributes Filter the row attributes for the row in table view.
Parameters
array$attributesThe HTML attributes.

Definition at line 152 of file class-gv-template-view-table.php.

References $attributes, $field, $value, GravityView_View\getInstance(), and Legacy_Context\load().

◆ the_field()

the_field ( \GV\Field  $field,
\GV\Entry  $entry 
)

Output a field cell.

Parameters
\GV\Field$fieldThe field to be ouput.
\GV\Field$entryThe entry this field is for.
Returns
void

Output.

Definition at line 251 of file class-gv-template-view-table.php.

References GV\$form, $value, GV\get(), and gravityview_field_output().

◆ tr_after()

static tr_after (   $context)
static

gravityview_table_tr_after and gravityview/template/table/tr/after actions.

Output inside the tr of the table.

Parameters
$contextThe 2.0 context.
Returns
void
Runs Actions:
gravityview/template/table/tr/after Output inside the tr of the table when there are no results.
Since
2.0
Parameters
\GV\Template_Context$contextThe template context.
Runs Actions:
gravityview_table_tr_after Inside the tr while rendering each entry in the loop. Can be used to insert additional table cells.
Since
1.0.7
Parameters
\GravityView_View$gravityview_viewCurrent GravityView_View object.

ugh!

Definition at line 370 of file class-gv-template-view-table.php.

References GravityView_View\getInstance().

◆ tr_before()

static tr_before (   $context)
static

gravityview_table_tr_before and gravityview/template/table/tr/after actions.

Output inside the tr of the table.

Parameters
$contextThe 2.0 context.
Returns
void
Runs Actions:
gravityview/template/table/tr/before Output inside the tr of the table when there are no results.
Since
2.0
Parameters
\GV\Template_Context$contextThe template context.
Runs Actions:
gravityview_table_tr_before Before the tr while rendering each entry in the loop. Can be used to insert additional table rows.
Since
1.0.7
Parameters
\GravityView_View$gravityview_viewCurrent GraivtyView_View object.

ugh!

Definition at line 344 of file class-gv-template-view-table.php.

References GravityView_View\getInstance().

Field Documentation

◆ $slug

$slug = 'table'
static

Definition at line 18 of file class-gv-template-view-table.php.


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