FormTag
class FormTag extends BaseConfigurableApiTag
Generates an HTML <form>
tag, for example:
<form enctype="multipart/form-data" action=API_URL method="POST"/>
<input name="timestamp" type="hidden" value="\d+">
<input name="public_id" type="hidden" value="hello">
<input name="signature" type="hidden" value="[0-9a-f]+">
<input name="api_key" type="hidden" value="1234">
</form>
Properties
Configuration | $config | from BaseTag | |
ApiConfig | $apiConfig | from BaseConfigurableApiTag |
Methods
BaseConfigurableApiTag constructor.
Imports (merges) the configuration.
Adds a tag class.
Resets tag classes and sets the specified one.
Sets tag attribute.
Sets (multiple) tag attributes.
Deletes tag attribute.
Adds tag content.
Sets the content of the tag to the specified one.
Serializes the tag to string.
Serializes the tag content.
Serializes the tag attributes.
Serializes the tag to string.
Serializes the tag to string.
Details
__construct(Configuration|string|array|null $configuration = null, array $uploadParams = [], string $assetType = AssetType::AUTO)
BaseConfigurableApiTag constructor.
Configuration
configuration(Configuration|string|array|null $configuration)
Sets the configuration.
BaseTag
importConfiguration(Configuration|string|array|null $configuration)
Imports (merges) the configuration.
BaseTag
addClass(string|array $class)
Adds a tag class.
BaseTag
setClass(string|array $class)
Resets tag classes and sets the specified one.
BaseTag
setAttribute(string $key, mixed $value = null)
Sets tag attribute.
BaseTag
setAttributes(array $attributes)
Sets (multiple) tag attributes.
BaseTag
deleteAttribute(string $key)
Deletes tag attribute.
$this
addContent(mixed $content, mixed $key = null)
Adds tag content.
BaseTag
setContent(mixed $content)
Sets the content of the tag to the specified one.
string
serialize()
Serializes the tag to string.
string
serializeContent(array $additionalContent = [], bool $prependAdditionalContent = false)
Serializes the tag content.
string
serializeAttributes(array $attributes = [])
Serializes the tag attributes.
string
toTag()
Serializes the tag to string.
string
__toString()
Serializes the tag to string.
Constants
SINGLE_QUOTES |
|
DOUBLE_QUOTES |
|
NAME |
|
IS_VOID |
|