BlockContainerInterface.php
2 years ago
BlockInterface.php
2 years ago
BlockTemplateInterface.php
2 years ago
ContainerInterface.php
2 years ago
BlockTemplateInterface.php
44 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Automattic\WooCommerce\Admin\BlockTemplates; |
| 4 | |
| 5 | /** |
| 6 | * Interface for block-based template. |
| 7 | */ |
| 8 | interface BlockTemplateInterface extends ContainerInterface { |
| 9 | /** |
| 10 | * Get the template ID. |
| 11 | */ |
| 12 | public function get_id(): string; |
| 13 | |
| 14 | /** |
| 15 | * Get the template title. |
| 16 | */ |
| 17 | public function get_title(): string; |
| 18 | |
| 19 | /** |
| 20 | * Get the template description. |
| 21 | */ |
| 22 | public function get_description(): string; |
| 23 | |
| 24 | /** |
| 25 | * Get the template area. |
| 26 | */ |
| 27 | public function get_area(): string; |
| 28 | |
| 29 | /** |
| 30 | * Generate a block ID based on a base. |
| 31 | * |
| 32 | * @param string $id_base The base to use when generating an ID. |
| 33 | * @return string |
| 34 | */ |
| 35 | public function generate_block_id( string $id_base ): string; |
| 36 | |
| 37 | /** |
| 38 | * Get the template as JSON like array. |
| 39 | * |
| 40 | * @return array The JSON. |
| 41 | */ |
| 42 | public function to_json(): array; |
| 43 | } |
| 44 |