You are here

public function PanelizerEntityTaxonomyTerm::hook_form_alter in Panelizer 7.2

Same name and namespace in other branches
  1. 7.3 plugins/entity/PanelizerEntityTaxonomyTerm.class.php \PanelizerEntityTaxonomyTerm::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/PanelizerEntityTaxonomyTerm.class.php, line 115
Class for the Panelizer taxonomy term entity plugin.

Class

PanelizerEntityTaxonomyTerm
Panelizer Entity taxonomy term plugin class.

Code

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