You are here

protected function LibraryItemNodeAttach::getEntity in Library 8

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.

File

src/Plugin/migrate/destination/LibraryItemNodeAttach.php, line 69

Class

LibraryItemNodeAttach
Form to attach to node.

Namespace

Drupal\library\Plugin\migrate\destination

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);
}