You are here

public static function LingotekConfigMetadata::loadByConfigName in Lingotek Translation 8

Same name and namespace in other branches
  1. 8.2 src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::loadByConfigName()
  2. 4.0.x src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::loadByConfigName()
  3. 3.0.x src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::loadByConfigName()
  4. 3.1.x src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::loadByConfigName()
  5. 3.2.x src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::loadByConfigName()
  6. 3.3.x src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::loadByConfigName()
  7. 3.4.x src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::loadByConfigName()
  8. 3.5.x src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::loadByConfigName()
  9. 3.6.x src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::loadByConfigName()
  10. 3.7.x src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::loadByConfigName()
  11. 3.8.x src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::loadByConfigName()

Loads or creates the lingotek config metadata for a given config name.

Parameters

string $config_name: The config name.

Return value

LingotekConfigMetadataInterface

18 calls to LingotekConfigMetadata::loadByConfigName()
LingotekConfigTranslationService::deleteConfigMetadata in src/LingotekConfigTranslationService.php
Deletes metadata.
LingotekConfigTranslationService::deleteMetadata in src/LingotekConfigTranslationService.php
Deletes metadata.
LingotekConfigTranslationService::getConfigDocumentId in src/LingotekConfigTranslationService.php
Gets the document id in the Lingotek platform for a given entity.
LingotekConfigTranslationService::getConfigSourceStatus in src/LingotekConfigTranslationService.php
Gets the source status of a given entity.
LingotekConfigTranslationService::getConfigTargetStatus in src/LingotekConfigTranslationService.php
Gets the translation status of a given entity translation for a locale.

... See full list

File

src/Entity/LingotekConfigMetadata.php, line 131

Class

LingotekConfigMetadata
Defines the Lingotek config metadata entity.

Namespace

Drupal\lingotek\Entity

Code

public static function loadByConfigName($config_name) {
  if ($config_name == NULL) {
    return NULL;
  }
  $config = \Drupal::entityManager()
    ->getStorage('lingotek_config_metadata')
    ->load($config_name);
  if ($config == NULL) {
    $config = LingotekConfigMetadata::create([
      'config_name' => $config_name,
    ]);
  }
  return $config;
}