public function LingotekConfigMetadata::getDependencyName in Lingotek Translation 3.4.x
Same name and namespace in other branches
- 8 src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::getDependencyName()
- 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.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 264
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();
}
elseif ($this
->entityTypeManager()
->hasDefinition($entity_type)) {
$storage = $this
->entityTypeManager()
->getStorage($entity_type);
$entity = $storage
->load($entity_id);
$value = $entity ? $entity
->getConfigDependencyName() : $this->config_name;
}
else {
$value = $this->config_name;
}
return $value;
}