You are here

public function StringDatabaseStorage::findTranslation in Localization update 7.2

Implements StringStorageInterface::findTranslation().

Overrides StringStorageInterface::findTranslation

File

includes/locale/StringDatabaseStorage.php, line 64
Definition of StringDatabaseStorage.

Class

StringDatabaseStorage
Defines the locale string class.

Code

public function findTranslation(array $conditions) {
  $values = $this
    ->dbStringSelect($conditions, array(
    'translation' => TRUE,
  ))
    ->execute()
    ->fetchAssoc();
  if (!empty($values)) {
    $string = new TranslationString($values);
    $this
      ->checkVersion($string, VERSION);
    $string
      ->setStorage($this);
    return $string;
  }
}