AbstractPageTemplate.php
1 year ago
AbstractTemplate.php
10 months ago
AbstractTemplateCompatibility.php
1 year ago
AbstractTemplatePart.php
2 years ago
AbstractTemplateWithFallback.php
7 months ago
ArchiveProductTemplatesCompatibility.php
1 year ago
CartTemplate.php
10 months ago
CheckoutHeaderTemplate.php
2 years ago
CheckoutTemplate.php
10 months ago
ClassicTemplatesCompatibility.php
1 year ago
ComingSoonSocialLinksTemplate.php
1 year ago
ComingSoonTemplate.php
1 year ago
ExternalProductAddToCartWithOptionsTemplate.php
1 year ago
GroupedProductAddToCartWithOptionsTemplate.php
1 year ago
MiniCartTemplate.php
2 years ago
OrderConfirmationTemplate.php
1 year ago
ProductAttributeTemplate.php
7 months ago
ProductBrandTemplate.php
7 months ago
ProductCatalogTemplate.php
7 months ago
ProductCategoryTemplate.php
7 months ago
ProductSearchResultsTemplate.php
7 months ago
ProductTagTemplate.php
7 months ago
SimpleProductAddToCartWithOptionsTemplate.php
1 year ago
SingleProductTemplate.php
2 months ago
SingleProductTemplateCompatibility.php
10 months ago
VariableProductAddToCartWithOptionsTemplate.php
1 year ago
AbstractTemplate.php
47 lines
| 1 | <?php |
| 2 | declare( strict_types=1 ); |
| 3 | namespace Automattic\WooCommerce\Blocks\Templates; |
| 4 | |
| 5 | /** |
| 6 | * AbstractTemplate class. |
| 7 | * |
| 8 | * Shared logic for templates. |
| 9 | * |
| 10 | * @internal |
| 11 | */ |
| 12 | abstract class AbstractTemplate { |
| 13 | |
| 14 | /** |
| 15 | * The slug of the template. |
| 16 | * |
| 17 | * @var string |
| 18 | */ |
| 19 | const SLUG = ''; |
| 20 | |
| 21 | /** |
| 22 | * Whether this is a taxonomy template. |
| 23 | * |
| 24 | * @var bool |
| 25 | */ |
| 26 | public bool $is_taxonomy_template = false; |
| 27 | |
| 28 | /** |
| 29 | * Initialization method. |
| 30 | */ |
| 31 | abstract public function init(); |
| 32 | |
| 33 | /** |
| 34 | * Should return the title of the template. |
| 35 | * |
| 36 | * @return string |
| 37 | */ |
| 38 | abstract public function get_template_title(); |
| 39 | |
| 40 | /** |
| 41 | * Should return the description of the template. |
| 42 | * |
| 43 | * @return string |
| 44 | */ |
| 45 | abstract public function get_template_description(); |
| 46 | } |
| 47 |