public function LingotekConfigMetadata::getDependencyName in Lingotek Translation 8
Same name and namespace in other branches
- 8.2 src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::getDependencyName()
- 4.0.x src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::getDependencyName()
- 3.0.x src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::getDependencyName()
- 3.1.x src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::getDependencyName()
- 3.2.x src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::getDependencyName()
- 3.3.x src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::getDependencyName()
- 3.4.x src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::getDependencyName()
- 3.5.x src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::getDependencyName()
- 3.6.x src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::getDependencyName()
- 3.7.x src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::getDependencyName()
- 3.8.x src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::getDependencyName()
2 calls to LingotekConfigMetadata::getDependencyName()
- LingotekConfigMetadata::calculateDependencies in src/
Entity/ LingotekConfigMetadata.php - Calculates dependencies and stores them in the dependency property.
- LingotekConfigMetadata::getConfigMapper in src/
Entity/ LingotekConfigMetadata.php - Gets the config mapper for this metadata.
File
- src/
Entity/ LingotekConfigMetadata.php, line 162
Class
- LingotekConfigMetadata
- Defines the Lingotek config metadata entity.
Namespace
Drupal\lingotek\EntityCode
public function getDependencyName() {
list($entity_type, $entity_id) = explode('.', $this->config_name, 2);
if ($entity_type === 'field_config') {
$field_config = FieldConfig::load($entity_id);
$value = $field_config
->getConfigDependencyName();
}
else {
if ($this
->entityManager()
->hasDefinition($entity_type)) {
$storage = $this
->entityManager()
->getStorage($entity_type);
$entity = $storage
->load($entity_id);
$value = $entity ? $entity
->getConfigDependencyName() : $this->config_name;
}
else {
$value = $this->config_name;
}
}
return $value;
}