LayoutTemplateRegistry
in package
Removed layout template registry.
Tags
Table of Contents
- $instance : LayoutTemplateRegistry|null
- Singleton instance.
- $removal_warning_logged : bool
- Whether the removal warning has already been logged for the current request.
- __construct() : mixed
- Constructor.
- get_instance() : LayoutTemplateRegistry
- Get the singleton instance.
- instantiate_layout_templates() : array<string|int, mixed>
- Instantiate the matching layout templates and return them.
- is_registered() : bool
- Check if a layout template is registered.
- register() : void
- Register a single layout template.
- unregister_all() : void
- Unregister all layout templates.
- maybe_log_removal_warning() : void
- Log a warning about the removed compatibility class.
Properties
$instance
Singleton instance.
private
static LayoutTemplateRegistry|null
$instance
= null
$removal_warning_logged
Whether the removal warning has already been logged for the current request.
private
static bool
$removal_warning_logged
= false
Methods
__construct()
Constructor.
public
__construct() : mixed
Return values
mixed —get_instance()
Get the singleton instance.
public
static get_instance() : LayoutTemplateRegistry
Return values
LayoutTemplateRegistry —instantiate_layout_templates()
Instantiate the matching layout templates and return them.
public
instantiate_layout_templates([array<string|int, mixed> $query_params = array() ]) : array<string|int, mixed>
Parameters
- $query_params : array<string|int, mixed> = array()
-
Query params.
Return values
array<string|int, mixed> —is_registered()
Check if a layout template is registered.
public
is_registered(string $layout_template_id) : bool
Parameters
- $layout_template_id : string
-
Layout template ID.
Return values
bool —register()
Register a single layout template.
public
register(string $layout_template_id, string $layout_template_area, string $layout_template_class_name) : void
Parameters
- $layout_template_id : string
-
Layout template ID.
- $layout_template_area : string
-
Layout template area.
- $layout_template_class_name : string
-
Layout template class to register.
Return values
void —unregister_all()
Unregister all layout templates.
public
unregister_all() : void
Return values
void —maybe_log_removal_warning()
Log a warning about the removed compatibility class.
private
static maybe_log_removal_warning() : void
