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

Widget to display page size. More...

Inheritance diagram for Page_Size:
Widget

Public Member Functions

 __construct ()
 
 override_view_page_size (&$view)
 Override the View settings and inject the needed page size. More...
 
 render_frontend ( $widget_args, $content='', $context=null)
 Render the page size widget. More...
 
- Public Member Functions inherited from Widget
 add_shortcode ()
 Add $this->shortcode_name shortcode to output self::render_frontend() More...
 
 as_configuration ()
 Return an array of the old format. More...
 
 assign_widget_options ( $options=array(), $template='', $widget='')
 Assign template specific widget options. More...
 
 get_setting ( $key)
 Get a setting by the setting key. More...
 
 get_settings ()
 Get the widget settings. More...
 
 get_widget_id ()
 Get the Widget ID. More...
 
 is_registered ()
 Whether this Widget's been registered already or not. More...
 
 maybe_do_shortcode ( $text, $widget=null)
 Do shortcode if the Widget's shortcode exists. More...
 
 pre_render_frontend ()
 General validations when rendering the widget. More...
 
 register_widget ( $widgets)
 Register widget to become available in admin. More...
 
 render_frontend ( $widget_args, $content='', $context='')
 Frontend logic. More...
 
 render_shortcode ( $atts, $content='', $context='')
 Shortcode. More...
 

Static Public Member Functions

static get_page_sizes ( $context)
 Get an array of page sizes. More...
 
- Static Public Member Functions inherited from Widget
static from_configuration ( $configuration)
 Create the needed widget from a configuration array. More...
 
static get_default_widget_areas ()
 Default widget areas. More...
 
static registered ()
 Return all registered widgets. More...
 

Data Fields

 $icon = 'dashicons-admin-settings'
 
- Data Fields inherited from Widget
 $configuration
 
 $icon
 
 $position = ''
 
 $UID = ''
 

Protected Attributes

 $show_on_single = false
 
 $widget_id = 'page_size'
 
- Protected Attributes inherited from Widget
 $defaults = array()
 
 $settings = array()
 
 $shortcode_name
 
 $widget_description = ''
 
 $widget_id = ''
 
 $widget_label = ''
 
 $widget_subtitle = ''
 

Additional Inherited Members

- Protected Member Functions inherited from Widget
 get_default_settings ()
 Define general widget settings. More...
 

Detailed Description

Widget to display page size.

Since
2.1

Definition at line 10 of file class-gravityview-widget-page-size.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Member Function Documentation

◆ get_page_sizes()

static get_page_sizes (   $context)
static

Get an array of page sizes.

Parameters
\GV\Template_Context | string$contextThe context, if available
Returns
array The page sizes in an array with value and text keys.
Runs Filter:
gravityview/widget/page_size/page_sizes Filter the available page sizes as needed
Parameters
array$sizesThe sizes, with value and text keys. text key used as HTML option label.
\GV\Template_Context$contextThe context.

Definition at line 47 of file class-gravityview-widget-page-size.php.

◆ override_view_page_size()

override_view_page_size ( $view)

Override the View settings and inject the needed page size.

This might be too early, seeing that there's lack of full context, but we should be fine for now.

Parameters
\GV\View$viewThe View.

Definition at line 150 of file class-gravityview-widget-page-size.php.

References Utils\_GET(), Template_Context\from_template(), and gravityview().

◆ render_frontend()

render_frontend (   $widget_args,
  $content = '',
  $context = null 
)

Render the page size widget.

Parameters
array$widget_argsThe Widget shortcode args.
string$contentThe content.
string | \GV\Template_Context$contextThe context, if available.
Runs Filter:
gravityview/widget/page_size/settings Filter the settings for the widget
Parameters
array$settingsConfiguration for how output will display, with label, choices, default_choice_text keys
\GV\Template_Context$contextThe context.

Definition at line 86 of file class-gravityview-widget-page-size.php.

References Widget\$settings, $value, Utils\_GET(), gv_selected(), and Widget\pre_render_frontend().

Field Documentation

◆ $icon

$icon = 'dashicons-admin-settings'

Definition at line 12 of file class-gravityview-widget-page-size.php.

◆ $show_on_single

$show_on_single = false
protected

Definition at line 18 of file class-gravityview-widget-page-size.php.

◆ $widget_id

$widget_id = 'page_size'
protected

Definition at line 20 of file class-gravityview-widget-page-size.php.


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