8.3.x ConfigEntityBase.php public ConfigEntityBase::setOriginalId($id)
8.0.x ConfigEntityBase.php public ConfigEntityBase::setOriginalId($id)
8.1.x ConfigEntityBase.php public ConfigEntityBase::setOriginalId($id)
8.2.x ConfigEntityBase.php public ConfigEntityBase::setOriginalId($id)
8.4.x ConfigEntityBase.php public ConfigEntityBase::setOriginalId($id)

Sets the original ID.

Parameters

int|string|null $id: The new ID to set as original ID. If the entity supports renames, setting NULL will prevent an update from being considered a rename.

Return value

$this

Overrides Entity::setOriginalId

1 call to ConfigEntityBase::setOriginalId()
ConfigEntityBase::__construct in core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
Constructs an Entity object.

File

core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php, line 133

Class

ConfigEntityBase
Defines a base configuration entity class.

Namespace

Drupal\Core\Config\Entity

Code

public function setOriginalId($id) {
  // Do not call the parent method since that would mark this entity as no
  // longer new. Unlike content entities, new configuration entities have an
  // ID.
  // @todo https://www.drupal.org/node/2478811 Document the entity life cycle
  //   and the differences between config and content.
  $this->originalId = $id;
  return $this;
}