Asset
class Asset extends LocalizedResource implements JsonSerializable
Properties
| protected string | $localeCode | The code of the currently active locale | 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(object $title, object $description, object $file, SystemProperties $sys)
Asset constructor.
in LocalizedResource at line 54
$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 76
string
getLocale()
The locale code for the currently set locale.
in LocalizedResource at line 90
protected string
getLocaleFromInput(Locale|string|null $input = null)
at line 56
string
getTitle(Locale|string|null $locale = null)
The title of the asset.
at line 68
string
getDescription(Locale|string|null $locale = null)
at line 99
string
getId()
Returns the ID of this Asset.
at line 111
int
getRevision()
Returns the Revision of this Asset.
at line 123
DateTimeImmutable
getUpdatedAt()
Returns the time when this Asset was last changed.
at line 135
DateTimeImmutable
getCreatedAt()
Returns the time when this Asset was created.
at line 147
Space
getSpace()
Returns the Space this Asset belongs to.
at line 161
object
jsonSerialize()
Returns an object to be used by json_encode to serialize objects of this class.