protected function StringDatabaseStorage::dbStringValues

Gets field values from a string object that are in the database table.

Parameters

Drupal\locale\StringInterface $string: The string object.

string $table: (optional) The table name.

Return value

array Array with field values indexed by field name.

2 calls to StringDatabaseStorage::dbStringValues()
StringDatabaseStorage::dbStringInsert in drupal/core/modules/locale/lib/Drupal/locale/StringDatabaseStorage.php
Createds a database record for a string object.
StringDatabaseStorage::dbStringUpdate in drupal/core/modules/locale/lib/Drupal/locale/StringDatabaseStorage.php
Updates string object in the database.

File

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

Class

StringDatabaseStorage
Defines the locale string class.

Namespace

Drupal\locale

Code

protected function dbStringValues($string, $table = NULL) {
  $table = $table ? $table : $this
    ->dbStringTable($string);
  if ($table && ($schema = drupal_get_schema($table))) {
    $fields = array_keys($schema['fields']);
    return $string
      ->getValues($fields);
  }
  else {
    return array();
  }
}