public function LingotekConfigChunk::deleteMetadataValue in Lingotek Translation 7.5
Same name and namespace in other branches
- 7.4 lib/Drupal/lingotek/LingotekConfigChunk.php \LingotekConfigChunk::deleteMetadataValue()
Deletes a Lingotek metadata value for this item
Parameters
string $key: The key for a name/value pair
File
- lib/
Drupal/ lingotek/ LingotekConfigChunk.php, line 670 - Defines LingotekConfigChunk.
Class
- LingotekConfigChunk
- A class wrapper for Lingotek-specific behavior on ConfigChunks.
Code
public function deleteMetadataValue($key) {
$metadata = $this
->metadata();
if (isset($metadata[$key])) {
db_delete('{lingotek_config_metadata}')
->condition('id', $this->cid)
->condition('config_key', $key, 'LIKE')
->execute();
}
}