You are here

function og_panels_panels_content_types in Organic groups 6

Same name and namespace in other branches
  1. 5.8 og_panels.module \og_panels_panels_content_types()
  2. 5 og_panels.module \og_panels_panels_content_types()
  3. 5.3 og_panels.module \og_panels_panels_content_types()
  4. 5.7 og_panels.module \og_panels_panels_content_types()

Implementation of hook_panels_content_types()

File

modules/og_panels/og_panels.module, line 555

Code

function og_panels_panels_content_types() {
  include_once './' . drupal_get_path('module', 'og_panels') . '/includes/groupcontent.inc';
  $items['og_mission'] = array(
    'title' => t('OG mission'),
    'content_types' => 'og_panels_ct_list_mission',
    'single' => TRUE,
    // only provides a single content type
    'render callback' => 'og_panels_ct_render_callback_mission',
    //      'add callback' => 'og_panels_content_types_add_callback',
    //      'edit callback' => 'og_panels_content_types_edit_callback',
    'title callback' => 'og_panels_ct_title_callback_mission',
  );
  $items['og_description'] = array(
    'title' => t('OG description'),
    'content_types' => 'og_panels_ct_list_description',
    'single' => TRUE,
    // only provides a single content type
    'render callback' => 'og_panels_ct_render_callback_description',
    'title callback' => 'og_panels_ct_title_callback_description',
  );
  $items['og_subscribers'] = array(
    'title' => t('OG members'),
    'content_types' => 'og_panels_ct_list_subscribers',
    'single' => TRUE,
    // only provides a single content type
    'render callback' => 'og_panels_ct_render_callback_subscribers',
    'add callback' => 'og_panels_content_types_addedit_callback_subscribers',
    'edit callback' => 'og_panels_content_types_addedit_callback_subscribers',
    'title callback' => 'og_panels_ct_title_callback_subscribers',
    'add validate callback' => 'og_panels_content_types_validate_callback_subscribers',
    'edit validate callback' => 'og_panels_content_types_validate_callback_subscribers',
  );
  if (module_exists('search')) {
    $items['og_search'] = array(
      'title' => t('Group search'),
      'content_types' => 'og_panels_ct_list_search',
      'single' => TRUE,
      // only provides a single content type
      'render callback' => 'og_panels_ct_render_callback_search',
      'title callback' => 'og_panels_ct_title_callback_search',
    );
  }
  if (og_is_picture()) {
    $items['og_faces'] = array(
      'title' => t('OG faces'),
      'content_types' => 'og_panels_ct_list_faces',
      'single' => TRUE,
      // only provides a single content type
      'render callback' => 'og_panels_ct_render_callback_faces',
      'add callback' => 'og_panels_content_types_addedit_callback_faces',
      'edit callback' => 'og_panels_content_types_addedit_callback_faces',
      'title callback' => 'og_panels_ct_title_callback_faces',
      'add validate callback' => 'og_panels_content_types_validate_callback_faces',
      'edit validate callback' => 'og_panels_content_types_validate_callback_faces',
    );
  }
  return $items;
}