public function PictureMapping::createDuplicate

Implements EntityInterface::createDuplicate().

Overrides ConfigEntityBase::createDuplicate

File

drupal/core/modules/picture/lib/Drupal/picture/Plugin/Core/Entity/PictureMapping.php, line 100
Definition of Drupal\picture\PictureMapping.

Class

PictureMapping
Defines the Picture entity.

Namespace

Drupal\picture\Plugin\Core\Entity

Code

public function createDuplicate() {
  return entity_create('picture_mapping', array(
    'id' => '',
    'label' => t('Clone of !label', array(
      '!label' => check_plain($this
        ->label()),
    )),
    'mappings' => $this->mappings,
  ));
}