Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
By fago on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.x
Issue links:
Description:
This change record applies only from Drupal 8.x-dev to Drupal 8.x-dev. If you are looking for Drupal 7.x to 8.x change records you may safely skip it.
Data definitions for the properties of a field type are now declared in a static propertyDefinitions()
method, instead of the non-static getPropertyDefinitions()
.
Example:
/**
* {@inheritdoc}
*/
public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) {
$properties['value'] = DataDefinition::create('integer')
->setLabel(t('Integer value'));
return $properties;
}
Check the issue summary of #2002134: Move TypedData metadata introspection from data objects to definition objects for a complete list of API changes and further details.
Impacts:
Module developers