class html_writer_support extends facade mixin html_writer_support

Facade for local_middag\framework\support\moodle\html_writer_support.

Properties

static protected array<string,object> $resolved_instances

The resolved object instances (cached roots).

from  abstract_facade
static protected bool $cached

Indicates if resolved instances should be cached.

from  abstract_facade

Methods

static mixed
__callStatic(string $method, array $args)

Dynamically handle static method calls on the facade proxy.

static string
get_facade_accessor()

Return the service accessor key for this facade.

static object
get_facade_root()

Get the root object behind the facade.

static void
swap(object $instance)

Swap a given instance for testing or runtime overriding.

static void
clear_resolved_instance(string $name)

Clear one cached facade instance.

static void
clearresolved_instances()

Clear all cached facade instances.

static void
disable_cache()

Disable instance caching (useful for testing).

static void
enable_cache()

Enable instance caching.

static void
reset()

Reset the facade: clear cache and re-enable caching.

static object
resolve_facade_instance(string $name)

Resolve the instance from the Kernel container.

static string
tag(string $tagname, string $contents, ?array $attributes = null)

No description

static string
start_tag(string $tagname, ?array $attributes = null)

No description

static string
end_tag(string $tagname)

No description

static string
empty_tag(string $tagname, ?array $attributes = null)

No description

static string
nonempty_tag(string $tagname, mixed $contents, ?array $attributes = null)

No description

static string
attribute(string $name, mixed $value)

No description

static string
attributes(?array $attributes = null)

No description

static string
img(mixed $src, mixed $alt, ?array $attributes = null)

No description

static string
random_id(mixed $base)

No description

static string
link(mixed $url, string $text, ?array $attributes = null)

No description

static string
checkbox(string $name, string $value, bool $checked = true, string $label = '', ?array $attributes = null, ?array $labelattributes = null)

No description

static string
select_yes_no(string $name, bool $selected = true, ?array $attributes = null)

No description

static string
select(array $options, string $name, $selected, $nothing, ] $, ?array $attributes = null, array $disabled = [])

No description

static string
select_time(string $type, string $name, int $currenttime, int $step = 5, ?array $attributes = null, mixed $timezone)

No description

static string
alist(array $items, ?array $attributes = null, string $tag = 'ul')

No description

static string
input_hidden_params(moodle_url $url, ?array $exclude = null)

No description

static string
script(string $jscode, mixed $url)

No description

static string
table(html_table $table)

No description

static string
label(string $text, ?string $for, bool $colonize = true, array $attributes = [])

No description

static string
div(string $content, string $class = '', ?array $attributes = null)

No description

static string
start_div(string $class = '', ?array $attributes = null)

No description

static string
end_div()

No description

static string
span(string $content, string $class = '', ?array $attributes = null)

No description

static string
start_span(string $class = '', ?array $attributes = null)

No description

static string
end_span()

No description

static string
html_to_text(string $html)

No description

Details

in abstract_facade at line 62
static mixed __callStatic(string $method, array $args)

Dynamically handle static method calls on the facade proxy.

Parameters

string $method
array $args

Return Value

mixed

Exceptions

BadMethodCallException
RuntimeException

at line 61
static string get_facade_accessor()

Return the service accessor key for this facade.

Return Value

string

the service ID or class name

in abstract_facade at line 94
static object get_facade_root()

Get the root object behind the facade.

Return Value

object

in abstract_facade at line 104
static void swap(object $instance)

Swap a given instance for testing or runtime overriding.

Parameters

object $instance

Return Value

void

in abstract_facade at line 118
static void clear_resolved_instance(string $name)

Clear one cached facade instance.

Parameters

string $name

Return Value

void

in abstract_facade at line 126
static void clearresolved_instances()

Clear all cached facade instances.

Return Value

void

in abstract_facade at line 134
static void disable_cache()

Disable instance caching (useful for testing).

Return Value

void

in abstract_facade at line 143
static void enable_cache()

Enable instance caching.

Return Value

void

in abstract_facade at line 151
static void reset()

Reset the facade: clear cache and re-enable caching.

Return Value

void

in abstract_facade at line 168
static protected object resolve_facade_instance(string $name)

Resolve the instance from the Kernel container.

Parameters

string $name

service identifier or class name registered in the container

Return Value

object

Exceptions

RuntimeException

at line 56
static string tag(string $tagname, string $contents, ?array $attributes = null)

No description

Parameters

string $tagname
string $contents
?array $attributes

Return Value

string

at line 56
static string start_tag(string $tagname, ?array $attributes = null)

No description

Parameters

string $tagname
?array $attributes

Return Value

string

at line 56
static string end_tag(string $tagname)

No description

Parameters

string $tagname

Return Value

string

at line 56
static string empty_tag(string $tagname, ?array $attributes = null)

No description

Parameters

string $tagname
?array $attributes

Return Value

string

at line 56
static string nonempty_tag(string $tagname, mixed $contents, ?array $attributes = null)

No description

Parameters

string $tagname
mixed $contents
?array $attributes

Return Value

string

at line 56
static string attribute(string $name, mixed $value)

No description

Parameters

string $name
mixed $value

Return Value

string

at line 56
static string attributes(?array $attributes = null)

No description

Parameters

?array $attributes

Return Value

string

at line 56
static string img(mixed $src, mixed $alt, ?array $attributes = null)

No description

Parameters

mixed $src
mixed $alt
?array $attributes

Return Value

string

at line 56
static string random_id(mixed $base)

No description

Parameters

mixed $base

Return Value

string

No description

Parameters

mixed $url
string $text
?array $attributes

Return Value

string

at line 56
static string checkbox(string $name, string $value, bool $checked = true, string $label = '', ?array $attributes = null, ?array $labelattributes = null)

No description

Parameters

string $name
string $value
bool $checked
string $label
?array $attributes
?array $labelattributes

Return Value

string

at line 56
static string select_yes_no(string $name, bool $selected = true, ?array $attributes = null)

No description

Parameters

string $name
bool $selected
?array $attributes

Return Value

string

at line 56
static string select(array $options, string $name, $selected, $nothing, ] $, ?array $attributes = null, array $disabled = [])

No description

Parameters

array $options
string $name
$selected
$nothing
] $
?array $attributes
array $disabled

Return Value

string

at line 56
static string select_time(string $type, string $name, int $currenttime, int $step = 5, ?array $attributes = null, mixed $timezone)

No description

Parameters

string $type
string $name
int $currenttime
int $step
?array $attributes
mixed $timezone

Return Value

string

at line 56
static string alist(array $items, ?array $attributes = null, string $tag = 'ul')

No description

Parameters

array $items
?array $attributes
string $tag

Return Value

string

at line 56
static string input_hidden_params(moodle_url $url, ?array $exclude = null)

No description

Parameters

moodle_url $url
?array $exclude

Return Value

string

at line 56
static string script(string $jscode, mixed $url)

No description

Parameters

string $jscode
mixed $url

Return Value

string

at line 56
static string table(html_table $table)

No description

Parameters

html_table $table

Return Value

string

at line 56
static string label(string $text, ?string $for, bool $colonize = true, array $attributes = [])

No description

Parameters

string $text
?string $for
bool $colonize
array $attributes

Return Value

string

at line 56
static string div(string $content, string $class = '', ?array $attributes = null)

No description

Parameters

string $content
string $class
?array $attributes

Return Value

string

at line 56
static string start_div(string $class = '', ?array $attributes = null)

No description

Parameters

string $class
?array $attributes

Return Value

string

at line 56
static string end_div()

No description

Return Value

string

at line 56
static string span(string $content, string $class = '', ?array $attributes = null)

No description

Parameters

string $content
string $class
?array $attributes

Return Value

string

at line 56
static string start_span(string $class = '', ?array $attributes = null)

No description

Parameters

string $class
?array $attributes

Return Value

string

at line 56
static string end_span()

No description

Return Value

string

at line 56
static string html_to_text(string $html)

No description

Parameters

string $html

Return Value

string