Implements \Drupal\Core\TypedData\ComplexDataInterface::getPropertyDefinitions().
Overrides Map::getPropertyDefinitions
public function getPropertyDefinitions() {
if (!isset(static::$propertyDefinitions)) {
static::$propertyDefinitions['value'] = array(
'type' => 'string',
'label' => t('Language code'),
);
static::$propertyDefinitions['language'] = array(
'type' => 'language',
'label' => t('Language object'),
// The language object is retrieved via the language code.
'computed' => TRUE,
'read-only' => FALSE,
'settings' => array(
'langcode source' => 'value',
),
);
}
return static::$propertyDefinitions;
}