LocalizedResource
class LocalizedResource extends BaseResource
A LocalizedResource can store information for multiple locales.
The methods in this base class allow switching between the locales.
Properties
protected string[] | $localeCodes | List of codes for all the locales available in the space this resource belongs to. | |
LocalizedResource | $sys |
Methods
__construct(array $data)
Resources in this SDK should not be built using $new Class()
.
from BaseResource
initLocales(array $locales)
No description
string
getLocale()
The locale code for the currently set locale.
string
string|null
Details
in BaseResource at line 26
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 38
asLink()
{@inheritdoc}
in BaseResource at line 49
getId()
{@inheritdoc}
in BaseResource at line 57
getType()
{@inheritdoc}
at line 41
initLocales(array $locales)
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.
at line 77
string
getLocale()
The locale code for the currently set locale.