You are here

function tvi_default_settings in Taxonomy Views Integrator 6

Same name and namespace in other branches
  1. 7 includes/tvi.query.inc \tvi_default_settings()

Returns a default setting object.

1 call to tvi_default_settings()
tvi_load_settings in includes/tvi.query.inc
Loads a setting from the database or return a default, if the $return_default flag is set.

File

includes/tvi.query.inc, line 11
TVI Database Interface

Code

function tvi_default_settings($type = TVI_TYPE_TERM, $xid = 0) {
  $schema = drupal_get_schema('tvi_settings');
  $settings = array_map(create_function('$field', 'return array_key_exists("default", $field) ? $field["default"] : NULL;'), $schema['fields']);

  // Override some values
  $settings['type'] = $type;
  $settings['xid'] = $xid;

  // Add some extra properties
  $settings['view_id'] = 0;
  $settings['is_default'] = TRUE;
  return (object) $settings;
}