You are here

public static function PaymentAwarePluginCollectionItem::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 PluginCollectionItemBase::propertyDefinitions

See also

\Drupal\Core\Field\BaseFieldDefinition

1 call to PaymentAwarePluginCollectionItem::propertyDefinitions()
PaymentStatusItem::propertyDefinitions in src/Plugin/Field/FieldType/PaymentStatusItem.php
Defines field item properties.
1 method overrides PaymentAwarePluginCollectionItem::propertyDefinitions()
PaymentStatusItem::propertyDefinitions in src/Plugin/Field/FieldType/PaymentStatusItem.php
Defines field item properties.

File

src/Plugin/Field/FieldType/PaymentAwarePluginCollectionItem.php, line 17

Class

PaymentAwarePluginCollectionItem
Provides a plugin item for payment-aware plugins.

Namespace

Drupal\payment\Plugin\Field\FieldType

Code

public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) {
  $properties = parent::propertyDefinitions($field_definition);
  $properties['plugin_instance'] = MapDataDefinition::create('payment_aware_plugin_instance')
    ->setLabel(t('Plugin instance'))
    ->setComputed(TRUE);
  return $properties;
}