Class HtmlHelper is a static container for HTML > HEAD > META values.
Also contains a set of handy methods for outputting html attrs to hide|show|disable|enable|check|uncheck elements based on provided condition.
- Class name: HtmlHelper
- Namespace: Chayka\Helpers
protected array $meta = array()
Container for meta values
- Visibility: protected
- This property is static.
mixed Chayka\Helpers\HtmlHelper::setMeta(string $key, mixed $value)
A setter for meta container
- Visibility: public
- This method is static.
- $key string
- $value mixed
mixed|string Chayka\Helpers\HtmlHelper::getMeta($key, string $default)
A getter for meta container
- Visibility: public
- This method is static.
- $key mixed
- $default string
mixed Chayka\Helpers\HtmlHelper::setHeadTitle(string $title)
Store html > head > title value
- Visibility: public
- This method is static.
- $title string
string Chayka\Helpers\HtmlHelper::getHeadTitle(string $default)
Retrieve html > head > title value
- Visibility: public
- This method is static.
- $default string
mixed Chayka\Helpers\HtmlHelper::setMetaKeywords(string $value)
Store html > head > meta > keywords value
- Visibility: public
- This method is static.
- $value string
string Chayka\Helpers\HtmlHelper::getMetaKeywords(string $default)
Retrieve html > head > meta > keywords value
- Visibility: public
- This method is static.
- $default string
mixed Chayka\Helpers\HtmlHelper::setMetaDescription(string $value)
Store html > head > meta > description value
- Visibility: public
- This method is static.
- $value string
string Chayka\Helpers\HtmlHelper::getMetaDescription(string $default)
Store html > head > meta > description value
- Visibility: public
- This method is static.
- $default string
hidden
mixed Chayka\Helpers\HtmlHelper::hidden(boolean $condition)
Output 'style="display: none;"' if $condition truthy
- Visibility: public
- This method is static.
- $condition boolean
mixed Chayka\Helpers\HtmlHelper::visible(boolean $condition)
Output 'style="display: none;"' if $condition truthy
- Visibility: public
- This method is static.
- $condition boolean
mixed Chayka\Helpers\HtmlHelper::checked(boolean $condition)
Output 'checked="checked"' if $condition truthy
- Visibility: public
- This method is static.
- $condition boolean
mixed Chayka\Helpers\HtmlHelper::disabled(boolean $condition)
Output 'disabled="disabled"' if $condition truthy
- Visibility: public
- This method is static.
- $condition boolean