You are here

protected function FieldGroup::getEntity in Field Group 8.3

Same name and namespace in other branches
  1. 8 contrib/field_group_migrate/src/Plugin/migrate/destination/d7/FieldGroup.php \Drupal\field_group_migrate\Plugin\migrate\destination\d7\FieldGroup::getEntity()

Gets the entity.

Parameters

string $entity_type: The entity type to retrieve.

string $bundle: The entity bundle.

string $mode: The display mode.

string $type: The destination type.

Return value

\Drupal\Core\Entity\Display\EntityDisplayInterface The entity display object.

2 calls to FieldGroup::getEntity()
FieldGroup::import in contrib/field_group_migrate/src/Plugin/migrate/destination/d7/FieldGroup.php
Import the row.
FieldGroup::rollback in contrib/field_group_migrate/src/Plugin/migrate/destination/d7/FieldGroup.php
Delete the specified destination object from the target Drupal.

File

contrib/field_group_migrate/src/Plugin/migrate/destination/d7/FieldGroup.php, line 88

Class

FieldGroup
This class imports one field_group of an entity form display.

Namespace

Drupal\field_group_migrate\Plugin\migrate\destination\d7

Code

protected function getEntity($entity_type, $bundle, $mode, $type) {
  $function = $type == 'entity_form_display' ? 'getFormDisplay' : 'getViewDisplay';
  return \Drupal::service('entity_display.repository')
    ->{$function}($entity_type, $bundle, $mode);
}