Same name in other branches
  1. 2.x src/EntityClone/Config/MenuEntityClone.php \Drupal\entity_clone\EntityClone\Config\MenuEntityClone

Class Menu Entity Clone.

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

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
ConfigEntityCloneBase::$entityTypeId protected property The entity type ID.
ConfigEntityCloneBase::$entityTypeManager protected property The entity type manager.
ConfigEntityCloneBase::createInstance public static function 1
ConfigEntityCloneBase::__construct public function Constructs a new ConfigEntityCloneBase. 1
MenuEntityClone::cloneEntity public function Clone an entity. Overrides ConfigEntityCloneBase::cloneEntity