GravityView_Entry_List
Generate linked list output for a list of entries.
Since: 1.7.2
Source: includes/class-gravityview-entry-list.php:13
Details
- Kind:
class - Namespace:
(global)
Properties
| Property | Type | Description |
|---|---|---|
$template_context | \GV\Template_Context | The context this list is operating in. |
$view_id | int | The ID of the View connected to the entries being displayed |
Methods
| Method | Description |
|---|---|
__construct() | |
set_post_id() | |
set_link_format() | |
set_skip_current_entry() | |
set_after_link() | |
set_empty_message() | Set the message when there are no entries to display |
set_context() | Set the context in which this entry list is being displayed. |
set_wrapper_tag() | |
set_item_tag() | |
output() | Echo the output generated by get_output() |
get_output() | Get the HTML output |
Method Reference
__construct()
function __construct( $entries=[], $post_id=0, $form=[], $link_format='', $after_link='', $context='', $template_context=null, $view_id=0 )
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$entries | array | GV\Entry[] | [] | |
$post_id | int | 0 | |
$form | array | [] | |
$link_format | string | '' | |
$after_link | string | '' | |
$context | '' | ||
$template_context | \GV\Template_Context | null | The context |
$view_id | int | null | 0 | View to link to when displaying on a page with multiple Views |
Since:
Source: includes/class-gravityview-entry-list.php:106
set_post_id()
public function set_post_id( $post_id )
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$post_id | int |
Source: includes/class-gravityview-entry-list.php:121
set_link_format()
public function set_link_format( $link_format )
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$link_format | string |
Source: includes/class-gravityview-entry-list.php:128
set_skip_current_entry()
public function set_skip_current_entry( $skip_current_entry )
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$skip_current_entry | boolean |
Source: includes/class-gravityview-entry-list.php:135
set_after_link()
public function set_after_link( $after_link )
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$after_link | string |
Source: includes/class-gravityview-entry-list.php:142
set_empty_message()
public function set_empty_message( $empty_message )
Set the message when there are no entries to display
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$empty_message | string |
Source: includes/class-gravityview-entry-list.php:151
set_context()
public function set_context( $context )
Set the context in which this entry list is being displayed.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$context | string |
Source: includes/class-gravityview-entry-list.php:160
set_wrapper_tag()
public function set_wrapper_tag( $wrapper_tag )
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$wrapper_tag | string |
Source: includes/class-gravityview-entry-list.php:167
set_item_tag()
public function set_item_tag( $item_tag )
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$item_tag | string |
Source: includes/class-gravityview-entry-list.php:175
output()
public function output()
Echo the output generated by get_output()
Returns
string— HTML output for entry list
See Also
Source: includes/class-gravityview-entry-list.php:186
get_output()
public function get_output()
Get the HTML output
Returns
string— HTML output for entry list
Source: includes/class-gravityview-entry-list.php:200