You are here

function og_get_types in Organic groups 6

Same name and namespace in other branches
  1. 5.8 og.module \og_get_types()
  2. 5 og.module \og_get_types()
  3. 5.3 og.module \og_get_types()
  4. 5.7 og.module \og_get_types()
  5. 6.2 og.module \og_get_types()
11 calls to og_get_types()
og_admin_settings in includes/og.admin.inc
Menu callback to load settings form.
og_devel_generate in ./og.module
og_get_sql_args in ./og.module
og_notifications_form_alter in modules/og_notifications/og_notifications.module
Implementation of hook_form_alter().
og_notifications_user_subscribe in modules/og_notifications/og_notifications.module
Subscribe a user to a group or to be more precise, to all subscribe-able content types within the group. This method is also called during the upgrade process in .install.

... See full list

File

./og.module, line 2341

Code

function og_get_types($usage) {
  $types = node_get_types();
  foreach ($types as $type) {
    if ($usage == 'group_post') {
      if (!og_is_omitted_type($type->type) && !og_is_group_type($type->type)) {
        $return[$usage][] = $type->type;
      }
    }
    else {
      $type_usage = variable_get('og_content_type_usage_' . $type->type, 'omitted');
      $return[$type_usage][] = $type->type;
    }
  }
  return isset($return[$usage]) ? $return[$usage] : array();
}