Gets field values from a string object that are in the database table.
Drupal\locale\StringInterface $string: The string object.
string $table: (optional) The table name.
array Array with field values indexed by field name.
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();
}
}