You are here

public static function EntityReferenceLayoutRevisioned::propertyDefinitions in Entity Reference with Layout 8

Define field properties.

Overrides EntityReferenceRevisionsItem::propertyDefinitions

File

src/Plugin/Field/FieldType/EntityReferenceLayoutRevisioned.php, line 32

Class

EntityReferenceLayoutRevisioned
Entity Reference Layout Revisioned field type.

Namespace

Drupal\entity_reference_layout\Plugin\Field\FieldType

Code

public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) {
  $properties = parent::propertyDefinitions($field_definition);
  $properties['region'] = DataDefinition::create('string')
    ->setLabel(t('Region'));
  $properties['layout'] = DataDefinition::create('string')
    ->setLabel(t('Layout'));
  $properties['section_id'] = DataDefinition::create('integer')
    ->setLabel(t('Section ID'));
  $properties['options'] = DataDefinition::create('any')
    ->setLabel(t('Options'));
  $properties['config'] = DataDefinition::create('any')
    ->setLabel(t('Config'));
  return $properties;
}