public function EntityDisplayBaseInterface::createCopy

Creates a duplicate of the EntityDisplay object on a different view mode.

The new object necessarily has the same $targetEntityType and $bundle properties than the original one.

Parameters

$view_mode: The view mode for the new object.

Return value

\Drupal\entity\Plugin\Core\Entity\EntityDisplay The new object.

1 method overrides EntityDisplayBaseInterface::createCopy()
EntityDisplayBase::createCopy in drupal/core/modules/entity/lib/Drupal/entity/EntityDisplayBase.php
Creates a duplicate of the EntityDisplay object on a different view mode.

File

drupal/core/modules/entity/lib/Drupal/entity/EntityDisplayBaseInterface.php, line 29
Contains \Drupal\entity\Plugin\Core\Entity\EntityDisplayBaseInterface.

Class

EntityDisplayBaseInterface
Provides an interface defining an entity display entity.

Namespace

Drupal\entity

Code

public function createCopy($view_mode);