public static function PaymentStatusItem::propertyDefinitions in Payment 8.2
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 PaymentAwarePluginCollectionItem::propertyDefinitions
See also
\Drupal\Core\Field\BaseFieldDefinition
File
- src/
Plugin/ Field/ FieldType/ PaymentStatusItem.php, line 20
Class
- PaymentStatusItem
- Provides a plugin collection for payment type plugins.
Namespace
Drupal\payment\Plugin\Field\FieldTypeCode
public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) {
$properties = parent::propertyDefinitions($field_definition);
$properties['created'] = DataDefinition::create('payment_status_created')
->setLabel(t('Created'));
return $properties;
}