You are here

function configuration_filter_format_load in Configuration Management 7

Load a filter format by its name.

2 calls to configuration_filter_format_load()
filter_configuration_export in includes/
Implements hook_configuration_export().
filter_configuration_export_render in includes/
Implements hook_configuration_export_render().


includes/, line 103


function configuration_filter_format_load($name) {

  // Use machine name for retrieving the format if available.
  $query = db_select('filter_format');
    ->condition('format', $name);

  // Retrieve filters for the format and attach.
  if ($format = $query
    ->fetchObject()) {
    $format->filters = array();
    foreach (filter_list_format($format->format) as $filter) {
      if (!empty($filter->status)) {
        $format->filters[$filter->name]['weight'] = $filter->weight;
        $format->filters[$filter->name]['status'] = $filter->status;
        $format->filters[$filter->name]['settings'] = $filter->settings;
    return $format;
  return FALSE;