You are here

function i18n_string_i18n_string_objects in Internationalization 7

Implements hook_i18n_string_objects().

Automate object list for object types that have a 'table' property

File

i18n_string/i18n_string.i18n.inc, line 12
Implementation of i18n hooks

Code

function i18n_string_i18n_string_objects($type) {
  if ($function = i18n_object_info($type, 'list callback')) {
    return call_user_func($function);
  }
  elseif ($table = i18n_string_object_info($type, 'table')) {
    $query = db_select($table, 's')
      ->fields('s');
    return $query
      ->execute()
      ->fetchAll();
  }
}