SpriteTag
class SpriteTag extends BaseTag
Generates an HTML <link>
tag to specify the relationship to the CSS file associated with an image sprite.
For example:
<link type="text/css" rel="stylesheet" href="https://res.cloudinary.com/demo/image/sprite/my_sprite.css">
Properties
Configuration | $config | from BaseTag | |
Image | $image | ||
ImageTransformation | $additionalTransformation |
Methods
Image format of the video poster.
Use fetch format transformation ("f_") instead of file extension.
SpriteTag 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.
Creates a new sprite tag from the provided public id and array of parameters.
Details
$this
videoPosterFormat(string $format)
Image format of the video poster.
$this
useFetchFormat(bool $useFetchFormat = true)
Use fetch format transformation ("f_") instead of file extension.
__construct(string $tag, Configuration|string|array|null $configuration = null, ImageTransformation $additionalTransformation = null)
SpriteTag 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.
static SpriteTag
fromParams(string $tag, array $params = [])
Creates a new sprite tag from the provided public id and array of parameters.
SpriteTag
image(mixed $tag, Configuration $configuration = null)
Creates the sprite image.
Constants
SINGLE_QUOTES |
|
DOUBLE_QUOTES |
|
NAME |
|
IS_VOID |
|