You are here

class MenuEntityClone in Entity Clone 8

Class MenuEntityClone.

Hierarchy

Expanded class hierarchy of MenuEntityClone

1 file declares its use of MenuEntityClone
entity_clone.module in ./entity_clone.module
Contains entity_clone.module.

File

src/EntityClone/Config/MenuEntityClone.php, line 10

Namespace

Drupal\entity_clone\EntityClone\Config
View source
class MenuEntityClone extends ConfigEntityCloneBase {

  /**
   * {@inheritDoc}
   */
  public function cloneEntity(EntityInterface $entity, EntityInterface $cloned_entity, array $properties = []) {

    /** @var \Drupal\system\Entity\Menu */
    $cloned_entity
      ->set('locked', FALSE);
    return parent::cloneEntity($entity, $cloned_entity, $properties);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigEntityCloneBase::$entityTypeId protected property The entity type ID.
ConfigEntityCloneBase::$entityTypeManager protected property The entity type manager.
ConfigEntityCloneBase::createInstance public static function Instantiates a new instance of this entity handler. Overrides EntityHandlerInterface::createInstance 1
ConfigEntityCloneBase::__construct public function Constructs a new ConfigEntityCloneBase. 1
MenuEntityClone::cloneEntity public function Clone an entity. Overrides ConfigEntityCloneBase::cloneEntity