public static function LanguageCombination::propertyDefinitions in Translation Management Tool 8
Defines field item properties.
Properties that are required to constitute a valid, non-empty item should be denoted with \Drupal\Core\TypedData\DataDefinition::setRequired().
Return value
\Drupal\Core\TypedData\DataDefinitionInterface[] An array of property definitions of contained properties, keyed by property name.
Overrides FieldItemInterface::propertyDefinitions
See also
\Drupal\Core\Field\BaseFieldDefinition
File
- translators/
tmgmt_local/ skills/ src/ Plugin/ Field/ FieldType/ LanguageCombination.php, line 27
Class
- LanguageCombination
- Plugin implementation of the 'tmgmt_language_combination' field type.
Namespace
Drupal\tmgmt_language_combination\Plugin\Field\FieldTypeCode
public static function propertyDefinitions(FieldStorageDefinitionInterface $field) {
$property_definitions['language_from'] = DataDefinition::create('string')
->setLabel(t('From language'));
$property_definitions['language_to'] = DataDefinition::create('string')
->setLabel(t('To language'));
return $property_definitions;
}