Asset
class Asset extends LocalizedResource implements JsonSerializable
Properties
protected string[] | $availableLocales | List of codes for all the locales available in the space this resource belongs to | from LocalizedResource |
Methods
Asset constructor.
Set the locale for this instance. All future calls to a getter will return the information for this locale.
Returns the ID of this Asset.
Returns the Revision of this Asset.
Returns the time when this Asset was last changed.
Returns the time when this Asset was created.
Returns an object to be used by json_encode
to serialize objects of this class.
Details
at line 39
__construct(array $title, array $description, array $file, SystemProperties $sys)
Asset constructor.
in LocalizedResource at line 56
$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 78
string
getLocale()
The locale code for the currently set locale.
in LocalizedResource at line 92
protected string
getLocaleFromInput(Locale|string|null $input = null)
in LocalizedResource at line 118
protected string|null
loopThroughFallbackChain(array $valueMap, string $localeCode, Space $space)
at line 58
string|null
getTitle(Locale|string|null $locale = null)
The title of the asset.
at line 79
string|null
getDescription(Locale|string|null $locale = null)
at line 119
string
getId()
Returns the ID of this Asset.
at line 131
int
getRevision()
Returns the Revision of this Asset.
at line 143
DateTimeImmutable
getUpdatedAt()
Returns the time when this Asset was last changed.
at line 155
DateTimeImmutable
getCreatedAt()
Returns the time when this Asset was created.
at line 167
Space
getSpace()
Returns the Space this Asset belongs to.
at line 181
object
jsonSerialize()
Returns an object to be used by json_encode
to serialize objects of this class.