You are here

function spaces_og_form_node_type_form_alter in Spaces 6.2

Implementation of hook_form_alter for node_type_form.

File

spaces_og/spaces_og.module, line 754

Code

function spaces_og_form_node_type_form_alter(&$form, $form_state) {
  if (isset($form['identity']['type'])) {
    $map = spaces_features_map('node');
    $features = spaces_features('og');
    if (!empty($map[$form['#node_type']->type])) {
      $feature = $map[$form['#node_type']->type];
      if (!empty($features[$feature])) {
        $form['og']['#collapsible'] = $form['og']['#collapsed'] = FALSE;
        $form['og']['message'] = array(
          '#type' => 'markup',
          '#value' => t('This content type is provided by the <strong>!feature</strong> feature and will be used as a <strong>standard group post</strong>.', array(
            '!feature' => $feature,
          )),
        );
        $form['og']['og_content_type_usage']['#access'] = FALSE;
      }
    }
  }
}