You are here

function rh_bean_form_bean_admin_ui_type_form_alter in Rabbit Hole 7.2

Implements hook_form_FORM_ID_alter().

This will add Rabbit Hole options to the bean type form. These settings will be used as default for every bean of this bean type.

File

modules/rh_bean/rh_bean.module, line 29
Main module file for Rabbit Hole beans module.

Code

function rh_bean_form_bean_admin_ui_type_form_alter(&$form, $form_state) {

  // Add the Rabbit Hole form.
  rabbit_hole_form($form, 'bean', $form['bean_type']['#value']->type, 'rh_bean');
  if (isset($form['rabbit_hole'])) {
    $form['rabbit_hole']['#attached']['js'][] = drupal_get_path('module', 'rh_bean') . '/rh-bean.js';
  }
}