BlockType Class

AcfEngine\Core\BlockType

Abstract base class for definition of a Block Type.

Properties #

Methods #

init() #

Parses arguments by calling $this->parseArgs() and then registers the ACF Block Type with $this->register().

register() #

Registers the Block Type with ACF using the function acf_register_block_type(). Before calling the registration function this method will organize and test the arguments set in current object.

setRenderTemplate( $v ) #

renderCallback() #

setRenderCallback( $v ) #

renderTemplate() #

defaultCallback( $block, $content = '', $isPreview, $editorPostId ) #

parseArgs() #

args() #

defaultArgs() #

getPrefixedKey() #

setKey( $v ) #

key() #

setTitle( $v ) #

Sets the $title property.

title() #

Getter for the $title property, returns the $title property.

setDescription( $v ) #

Setter for the $description property.

description() #

Getter for the $description property. Returns $description.

setRenderCode( $v ) #

renderCode() #

setCategory( $v ) #

Setter for the $category property.

category() #

Getter for the $category property.

setIcon( $v )

icon()

setKeywords( $v )

keywords()

setPostTypes( $v )

postTypes()

setMode( $v )

mode() #

Getter for the $mode property.

setAlign( $v ) #

Setter for the $align property.

align() #

Getter for the $align property.

setAlignText( $v )

alignText()

setAlignContent( $v )

alignContent()

setEnqueueStyle( $v )

enqueueStyle()

setEnqueueScript( $v )

enqueueScript()

setEnqueueAssets( $v )

enqueueAssets()

postType() #

Returns the $postType property for this post type, "acfg_block_type". This is the set key used to initiate the ACF Block Type post type.

import() #

Import handler method used to import a single Block Type from JSON data. Called by the Import class.

Powered by BetterDocs

Leave a Reply