You are here

function drupalchat_preprocess_drupalchat in DrupalChat 7

Same name and namespace in other branches
  1. 8 drupalchat.module \drupalchat_preprocess_drupalchat()
  2. 6.2 drupalchat.module \drupalchat_preprocess_drupalchat()
  3. 6 drupalchat.module \drupalchat_preprocess_drupalchat()
  4. 7.2 drupalchat.module \drupalchat_preprocess_drupalchat()

@todo Please document this function.

See also

http://drupal.org/node/1354

File

./drupalchat.module, line 185
Module code for DrupalChat.

Code

function drupalchat_preprocess_drupalchat(&$variables) {
  $modules = module_invoke_all('drupalchat_subpanel');
  $items = array();
  $items[] = array(
    'data' => _drupalchat_chat(),
    'id' => 'chatpanel',
  );
  foreach ($modules as $module) {
    $items[] = array(
      'data' => theme('drupalchat_subpanel', array(
        'subpanel' => $module,
      )),
      'id' => $module['name'],
    );
  }
  $variables['subpanels'] = theme('item_list', array(
    'items' => $items,
    'title' => NULL,
    'type' => 'ul',
    'attributes' => array(
      'id' => 'mainpanel',
    ),
  ));
}