Same filename in other branches
  1. 8.x-1.x src/EntityClone/Config/MenuEntityClone.php

Namespace

Drupal\entity_clone\EntityClone\Config

File

src/EntityClone/Config/MenuEntityClone.php

View source
<?php

namespace Drupal\entity_clone\EntityClone\Config;

use Drupal\Core\Entity\EntityInterface;

/**
 * Class Menu Entity Clone.
 */
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

Title Deprecated Summary
MenuEntityClone Class Menu Entity Clone.