You are here

MenuEntityClone.php in Entity Clone 8

File

src/EntityClone/Config/MenuEntityClone.php
View source
<?php

namespace Drupal\entity_clone\EntityClone\Config;

use Drupal\Core\Entity\EntityInterface;

/**
 * Class MenuEntityClone.
 */
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);
  }

}

Classes

Namesort descending Description
MenuEntityClone Class MenuEntityClone.