Blocks

Block_Details
in package

Holds details about the block, like the name, slug, class name, path, etc.

Table of Contents

Properties

$block_label  : string
The label of the block.
$package_path  : string
The path to the package.

Methods

__construct()  : mixed
Constructor.
get_block_class_file_name()  : string
Gets the block class file name.
get_block_class_name()  : string
Gets a valid class name for the block.
get_block_class_path()  : string
Gets the path to the block class.
get_block_folder_name()  : string
Gets the name of the block folder.
get_block_folder_path()  : string
Gets the path to the block folder.
get_block_html_base_class()  : string
Gets the base class name for the block.
get_block_plugin_version()  : string
Determines the version of the block plugin.
get_block_slug_name()  : string
Gets a valid slug name for the block.
get_block_template_path()  : string
Gets the default path to the block template.
get_package_name()  : string
Gets the name of the theme.
get_package_slug()  : string
Gets the slug of the package.
get_relative_block_class_path()  : string
Gets the relative path to the block class.
get_stubs_path()  : string
Gets the path to the stubs.

Properties

Methods

__construct()

Constructor.

public __construct(string $label, string $package_path) : mixed
Parameters
$label : string

The label of the block.

$package_path : string

The path to the package.

get_block_class_file_name()

Gets the block class file name.

public get_block_class_file_name() : string
Return values
string

get_block_class_name()

Gets a valid class name for the block.

public get_block_class_name() : string
Tags
throws
Exception

If the block label is not set.

Return values
string

get_block_class_path()

Gets the path to the block class.

public get_block_class_path() : string
Return values
string

get_block_folder_name()

Gets the name of the block folder.

public get_block_folder_name() : string
Return values
string

get_block_folder_path()

Gets the path to the block folder.

public get_block_folder_path() : string
Return values
string

get_block_html_base_class()

Gets the base class name for the block.

public get_block_html_base_class() : string
Return values
string

get_block_plugin_version()

Determines the version of the block plugin.

public get_block_plugin_version() : string
Return values
string

get_block_slug_name()

Gets a valid slug name for the block.

public get_block_slug_name() : string
Return values
string

get_block_template_path()

Gets the default path to the block template.

public get_block_template_path() : string
Return values
string

get_package_name()

Gets the name of the theme.

public get_package_name() : string
Return values
string

get_package_slug()

Gets the slug of the package.

public get_package_slug() : string
Return values
string

get_relative_block_class_path()

Gets the relative path to the block class.

public get_relative_block_class_path() : string
Return values
string

get_stubs_path()

Gets the path to the stubs.

public get_stubs_path() : string
Return values
string

        
On this page

Search results