You are here

public function PanelizerEntityBean::hook_form_alter in Bean (for Drupal 7) 7

Implements a delegated hook_form_alter.

We want to add Panelizer settings for the bundle to the bean type form.

File

plugins/entity/PanelizerEntityBean.class.php, line 68
Class for the Panelizer bean entity plugin.

Class

PanelizerEntityBean
Panelizer Entity bean plugin class.

Code

public function hook_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'bean_admin_ui_type_form') {
    if (isset($form['bean_type'])) {
      $bundle = $form['bean_type']['#value']->type;
      $this
        ->add_bundle_setting_form($form, $form_state, $bundle, array(
        'type',
      ));
    }
  }
}