You are here

protected function FieldGroup::getEntity in Field Group 8

Same name and namespace in other branches
  1. 8.3 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 92
Contains \Drupal\field_group_migrate\Plugin\migrate\destination\d7\FieldGroup.

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' ? 'entity_get_form_display' : 'entity_get_display';
  return $function($entity_type, $bundle, $mode);
}