W3cubDocs

/Drupal 8

public function ConfigEntityBase::getConfigTarget

public 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 Entity::getConfigTarget

File

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

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();
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Config!Entity!ConfigEntityBase.php/function/ConfigEntityBase::getConfigTarget/8.1.x