You are here

public function BundleEntityDuplicatorInterface::duplicateFields in Entity API 8

Duplicates the bundle entity's fields.

Parameters

\Drupal\Core\Config\Entity\ConfigEntityInterface $bundle_entity: The bundle entity.

string $target_bundle_id: The target bundle ID.

Throws

\InvalidArgumentException Thrown if the given entity is not a bundle entity.

1 method overrides BundleEntityDuplicatorInterface::duplicateFields()
BundleEntityDuplicator::duplicateFields in src/BundleEntityDuplicator.php
Duplicates the bundle entity's fields.

File

src/BundleEntityDuplicatorInterface.php, line 41

Class

BundleEntityDuplicatorInterface
Duplicates bundle entities, their fields and displays.

Namespace

Drupal\entity

Code

public function duplicateFields(ConfigEntityInterface $bundle_entity, $target_bundle_id);