public function LingotekConfigChunk::getMetadataValue in Lingotek Translation 7.5
Same name and namespace in other branches
- 7.3 lib/Drupal/lingotek/LingotekConfigChunk.php \LingotekConfigChunk::getMetadataValue()
- 7.4 lib/Drupal/lingotek/LingotekConfigChunk.php \LingotekConfigChunk::getMetadataValue()
Gets a Lingotek metadata value for this item.
Parameters
string $key: The key whose value should be returned.
Return value
string The value for the specified key, if it exists.
Overrides LingotekTranslatableEntity::getMetadataValue
2 calls to LingotekConfigChunk::getMetadataValue()
- LingotekConfigChunk::contentUpdated in lib/
Drupal/ lingotek/ LingotekConfigChunk.php - Event handler for updates to the config chunk's data.
- LingotekConfigChunk::lingotekDocumentId in lib/
Drupal/ lingotek/ LingotekConfigChunk.php - Get the Lingotek document ID for this entity.
File
- lib/
Drupal/ lingotek/ LingotekConfigChunk.php, line 621 - Defines LingotekConfigChunk.
Class
- LingotekConfigChunk
- A class wrapper for Lingotek-specific behavior on ConfigChunks.
Code
public function getMetadataValue($key) {
return db_select('{lingotek_config_metadata}', 'meta')
->fields('meta', array(
'value',
))
->condition('config_key', $key)
->condition('id', $this->cid)
->execute()
->fetchField();
}