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

Public Member Functions

 __construct ()
 
 add_block_category ( $categories)
 Adds GravityView category to Gutenberg editor. More...
 
 get_views ()
 Returns the list of views for the block editor. More...
 
 localize_block_assets ()
 Localizes shared block assets that's made available to all blocks via the global window.gkGravityKitBlocks object. More...
 
 register_blocks ()
 Registers block renderers. More...
 

Static Public Member Functions

static render_shortcode ( $shortcode)
 Renders shortcode and returns rendered content along with newly enqueued scripts and styles. More...
 

Data Fields

const MIN_WP_VERSION = '6.0.0'
 
const SLUG = 'gk-gravityview-blocks'
 

Private Attributes

 $blocks_build_path
 

Detailed Description

Definition at line 8 of file class-gv-gutenberg-blocks.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Definition at line 15 of file class-gv-gutenberg-blocks.php.

References GRAVITYVIEW_DIR.

Member Function Documentation

◆ add_block_category()

add_block_category (   $categories)

Adds GravityView category to Gutenberg editor.

Since
$ver$
Parameters
array$categories
Returns
array

Definition at line 144 of file class-gv-gutenberg-blocks.php.

◆ get_views()

get_views ( )

Returns the list of views for the block editor.

Since
$ver$
Returns
array|array[]
Runs Filter:
gk/gravityview/gutenberg/blocks/views Modifies the Views object used in the UI.
Since
$ver$
Parameters
array$formatted_views

Definition at line 197 of file class-gv-gutenberg-blocks.php.

References GVCommon\get_all_views().

Referenced by Blocks\localize_block_assets().

◆ localize_block_assets()

localize_block_assets ( )

Localizes shared block assets that's made available to all blocks via the global window.gkGravityKitBlocks object.

Since
$ver$
Returns
void
Runs Filter:
gk/gravityview/gutenberg/blocks/localization Modifies the global blocks localization data.
Since
$ver$
Parameters
array$block_localization_data

Definition at line 160 of file class-gv-gutenberg-blocks.php.

References Blocks\get_views(), and gravityview().

◆ register_blocks()

register_blocks ( )

Registers block renderers.

Since
$ver$
Returns
void

Definition at line 38 of file class-gv-gutenberg-blocks.php.

References Arr\get(), GRAVITYVIEW_DIR, and GRAVITYVIEW_FILE.

◆ render_shortcode()

static render_shortcode (   $shortcode)
static

Renders shortcode and returns rendered content along with newly enqueued scripts and styles.

Since
$ver$
Parameters
string$shortcode
Returns
array{content: string, scripts: array, styles: array}

Definition at line 235 of file class-gv-gutenberg-blocks.php.

References GravityView_frontend\getInstance(), and GravityView_View_Data\getInstance().

Referenced by Entry\render(), ViewDetails\render(), EntryField\render(), EntryLink\render(), and View\render().

Field Documentation

◆ $blocks_build_path

$blocks_build_path
private

Definition at line 13 of file class-gv-gutenberg-blocks.php.

◆ MIN_WP_VERSION

const MIN_WP_VERSION = '6.0.0'

Definition at line 9 of file class-gv-gutenberg-blocks.php.

◆ SLUG

const SLUG = 'gk-gravityview-blocks'

Definition at line 11 of file class-gv-gutenberg-blocks.php.


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