You are here

function entityqueue_smartqueue_entity_field_storage_info in Entityqueue 8

Implements hook_entity_field_storage_info().

File

modules/entityqueue_smartqueue/entityqueue_smartqueue.module, line 33
Provides automated subqueues for each entity of a given entity type.

Code

function entityqueue_smartqueue_entity_field_storage_info(EntityTypeInterface $entity_type) {
  if ($entity_type
    ->id() === 'entity_subqueue') {
    $field_storage_definitions['attached_entity'] = BaseFieldDefinition::create('entity_reference')
      ->setName('attached_entity')
      ->setTargetEntityTypeId('entity_subqueue')
      ->setTargetBundle(NULL)
      ->setLabel(t('Attached entity'))
      ->setSetting('target_type', 'entity_subqueue');
    return $field_storage_definitions;
  }
}