Asset
class Asset extends LocalizedResource implements AssetInterface
Traits
Properties
protected string[] | $localeCodes | List of codes for all the locales available in the space this resource belongs to. | from LocalizedResource |
protected Asset | $sys | ||
protected Tag[] | $tags | from TagTrait | |
protected string[] | $title | ||
protected string[] | $description | ||
protected FileInterface[] | $file |
Methods
Resources in this SDK should not be built using $new Class()
.
{@inheritdoc}
Returns the space this asset belongs to.
Returns the environment this asset belongs to.
{@inheritdoc}
Details
in BaseResource at line 24
protected
__construct(array $data)
Resources in this SDK should not be built using $new Class()
.
This method is only useful in testing environments, where the resource needs to be subclasses and this method made public.
in BaseResource at line 36
asLink()
{@inheritdoc}
in BaseResource at line 47
getId()
{@inheritdoc}
in BaseResource at line 55
getType()
{@inheritdoc}
in LocalizedResource at line 41
initLocales(array $locales)
in LocalizedResource at line 65
$this
setLocale(Locale|string $locale)
Set the locale for this instance.
All future calls to a getter will return the information for this locale.
in LocalizedResource at line 77
getLocale()
The locale code for the currently set locale.
It will be either the default locale if the resource was fetched using "locale=*", or the one that was used in the API request.
in LocalizedResource at line 87
protected
getLocaleFromInput(Locale|string|null $input = null)
in LocalizedResource at line 113
protected string|null
walkFallbackChain(array $valueMap, string $localeCode, Environment $environment)
in TagTrait at line 23
initTags(array $tags)
in TagTrait at line 28
protected
jsonSerializeSpace()
in TagTrait at line 35
getTags()
at line 46
getSystemProperties()
{@inheritdoc}
at line 54
getSpace()
Returns the space this asset belongs to.
at line 62
getEnvironment()
Returns the environment this asset belongs to.
at line 72
string|null
getTitle(Locale|string|null $locale = null)
at line 85
string|null
getDescription(Locale|string|null $locale = null)
at line 98
FileInterface|null
getFile(Locale|string|null $locale = null)
at line 133
jsonSerialize()
{@inheritdoc}