ProductFormTemplateInterface
extends
BlockTemplateInterface
in
Interface for block containers.
Table of Contents
- add_group() : GroupInterface
- Adds a new group block.
- generate_block_id() : string
- Generate a block ID based on a base.
- get_area() : string
- Get the template area.
- get_block() : BlockInterface|null
- Get a block by ID.
- get_block_by_id() : BlockInterface|null
- Gets Block by id.
- get_description() : string
- Get the template description.
- get_formatted_template() : array<string|int, mixed>
- Get the block configuration as a formatted template.
- get_group_by_id() : GroupInterface|null
- Gets Group block by id.
- get_id() : string
- Get the template ID.
- get_root_template() : BlockTemplateInterface
- Get the root template that the block belongs to.
- get_section_by_id() : SectionInterface|null
- Gets Section block by id.
- get_subsection_by_id() : SubsectionInterface|null
- Gets subsection block by id.
- get_title() : string
- Get the template title.
- remove_block() : mixed
- Removes a block from the container.
- remove_blocks() : mixed
- Removes all blocks from the container.
- to_json() : array<string|int, mixed>
- Get the template as JSON like array.
Methods
add_group()
Adds a new group block.
public
add_group(array<string|int, mixed> $block_config) : GroupInterface
Parameters
- $block_config : array<string|int, mixed>
-
block config.
Return values
GroupInterface — new group block.generate_block_id()
Generate a block ID based on a base.
public
generate_block_id(string $id_base) : string
Parameters
- $id_base : string
-
The base to use when generating an ID.
Return values
string —get_area()
Get the template area.
public
get_area() : string
Return values
string —get_block()
Get a block by ID.
public
get_block(string $block_id) : BlockInterface|null
Parameters
- $block_id : string
-
The block ID.
Return values
BlockInterface|null —get_block_by_id()
Gets Block by id.
public
get_block_by_id(string $block_id) : BlockInterface|null
Parameters
- $block_id : string
-
block id.
Return values
BlockInterface|null —get_description()
Get the template description.
public
get_description() : string
Return values
string —get_formatted_template()
Get the block configuration as a formatted template.
public
get_formatted_template() : array<string|int, mixed>
Return values
array<string|int, mixed> —get_group_by_id()
Gets Group block by id.
public
get_group_by_id(string $group_id) : GroupInterface|null
Parameters
- $group_id : string
-
group id.
Return values
GroupInterface|null —get_id()
Get the template ID.
public
get_id() : string
Return values
string —get_root_template()
Get the root template that the block belongs to.
public
get_root_template() : BlockTemplateInterface
Return values
BlockTemplateInterface —get_section_by_id()
Gets Section block by id.
public
get_section_by_id(string $section_id) : SectionInterface|null
Parameters
- $section_id : string
-
section id.
Return values
SectionInterface|null —get_subsection_by_id()
Gets subsection block by id.
public
get_subsection_by_id(string $subsection_id) : SubsectionInterface|null
Parameters
- $subsection_id : string
-
subsection id.
Return values
SubsectionInterface|null —get_title()
Get the template title.
public
get_title() : string
Return values
string —remove_block()
Removes a block from the container.
public
remove_block(string $block_id) : mixed
Parameters
- $block_id : string
-
The block ID.
Tags
Return values
mixed —remove_blocks()
Removes all blocks from the container.
public
remove_blocks() : mixed
Return values
mixed —to_json()
Get the template as JSON like array.
public
to_json() : array<string|int, mixed>