You are here

public function ConfigEntityBase::getConfigTarget in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php \Drupal\Core\Config\Entity\ConfigEntityBase::getConfigTarget()
  2. 10 core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php \Drupal\Core\Config\Entity\ConfigEntityBase::getConfigTarget()

Gets the configuration target identifier for the entity.

Used to supply the correct format for storing a reference targeting this entity in configuration.

Return value

string The configuration target identifier.

Overrides EntityBase::getConfigTarget

File

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

Class

ConfigEntityBase
Defines a base configuration entity class.

Namespace

Drupal\Core\Config\Entity

Code

public function getConfigTarget() {

  // For configuration entities, use the config ID for the config target
  // identifier. This ensures that default configuration (which does not yet
  // have UUIDs) can be provided and installed with references to the target,
  // and also makes config dependencies more readable.
  return $this
    ->id();
}