You are here

public function PanelizerEntityNode::hook_form_alter in Panelizer 7.2

Same name and namespace in other branches
  1. 7.3 plugins/entity/PanelizerEntityNode.class.php \PanelizerEntityNode::hook_form_alter()

Implements a delegated hook_form_alter.

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

Overrides PanelizerEntityDefault::hook_form_alter

File

plugins/entity/PanelizerEntityNode.class.php, line 208
Class for the Panelizer node entity plugin.

Class

PanelizerEntityNode
Panelizer Entity node plugin class.

Code

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