1 contact.module contact_load($cid)

Loads a contact category.

Parameters

int $cid: The contact category id.

Return value

array: An array with the contact category's data.

File

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

Code

function contact_load($cid) {
  $cat_data = contact_config_data();
  $categories = $cat_data['categories'];

  if ($categories) {
    foreach ($categories as $key => $cat) {
      if ($cid == $cat['cid']) {
        $contact = $categories[$key];
        return $contact;
      }
    }
  }
  return FALSE;
}