1 contact.module contact_config_data()

Loads an array of all contact categories.

Return value

array: An array of contact category data.

File

core/modules/contact/contact.module, line 215
Enables the use of personal and site-wide contact forms.

Code

function contact_config_data() {
  $config_data = array();

  $config = config('contact.categories');
  $config_data['contact_default_category'] = $config->get('contact_default_category');

  $categories = $config->get('categories');

  // Sort the categories by weight then category.
  if ($categories) {
    backdrop_sort($categories, array('weight' => SORT_NUMERIC, 'category' => SORT_STRING));
  }
  $config_data['categories'] = $categories;

  return $config_data;
}