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 Client | $client | from BaseResource | |
protected SystemProperties | $sys | from BaseResource | |
protected string[] | $localeCodes | List of codes for all the locales available in the space this resource belongs to. |
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 36
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 50
SystemProperties
getSystemProperties()
{@inheritdoc}
in BaseResource at line 58
asLink()
{@inheritdoc}
in BaseResource at line 69
getId()
{@inheritdoc}
in BaseResource at line 77
getType()
{@inheritdoc}
at line 35
initLocales(array $locales)
at line 58
$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 70
string
getLocale()
The locale code for the currently set locale.