public function StringDatabaseStorage::findString

Implements Drupal\locale\StringStorageInterface::findString().

Overrides StringStorageInterface::findString

File

drupal/core/modules/locale/lib/Drupal/locale/StringDatabaseStorage.php, line 64
Definition of Drupal\locale\StringDatabaseStorage.

Class

StringDatabaseStorage
Defines the locale string class.

Namespace

Drupal\locale

Code

public function findString(array $conditions) {
  $values = $this
    ->dbStringSelect($conditions)
    ->execute()
    ->fetchAssoc();
  if (!empty($values)) {
    $string = new SourceString($values);
    $string
      ->setStorage($this);
    return $string;
  }
}