You are here

public function NodeInlineEntityFormController::createClone in Inline Entity Form 7

Overrides EntityInlineEntityFormController::createClone().

Overrides EntityInlineEntityFormController::createClone

File

includes/node.inline_entity_form.inc, line 92
Defines the inline entity form controller for Nodes.

Class

NodeInlineEntityFormController
@file Defines the inline entity form controller for Nodes.

Code

public function createClone($entity) {
  global $user;
  $cloned_entity = parent::createClone($entity);
  $cloned_entity->tnid = NULL;
  $cloned_entity->name = isset($user->name) ? $user->name : NULL;
  $cloned_entity->path = NULL;
  return $cloned_entity;
}