\i18nEnum
Class i18nEnum represents an enumeration of a set of strings in current language.
See for a to select enum values.
- Author: Elvinas Liutkevičius <elvinas@unisolutions.eu>
- License: BSD http://silverstripe.org/BSD-license
Synopsis
class i18nEnum
extends Enum
{
- // members
- private string $DbObjectName = 'Enum';
- // methods
- public void setValue()
- public void enumValues()
- public static void getTranslatedValue()
Hierarchy
Extends
- Enum
Members
private
-
$DbObjectName
used form i18n namespace, we'll set it to the table name
Methods
public
- enumValues() — return translated (if it is set) value
- getTranslatedValue() — returns translated enum value This static method can be used in your data object to get translated value in {@link GridField}
- setValue() — set i18n namespace to the table name