1 block.page_components.inc PageComponents::form(&$form, &$form_state)

Build the settings form for editing this block.

Overrides Block::form

File

core/modules/system/block.page_components.inc, line 62

Class

PageComponents
PageComponents extends Block

Code

function form(&$form, &$form_state) {
  parent::form($form, $form_state);
  $form['title_display']['#access'] = FALSE;

  if ($this->childDelta == 'title_combo' || $this->childDelta == 'title') {
    $form['title_wrapper'] = array(
      '#type' => 'fieldset',
      '#title' => t('Page title'),
    );
    $form['title_wrapper']['title_tag'] = array(
      '#title' => t('Title tag'),
      '#type' => 'select',
      '#options' => array(
        'h1' => 'H1',
        'h2' => 'H2',
        'h3' => 'H3',
        'h4' => 'H4',
        'h5' => 'H5',
        'h6' => 'H6',
        'div' => 'DIV',
      ),
      '#default_value' => $this->settings['title_tag'],
    );
    $form['title_wrapper']['title_classes'] = array(
      '#title' => t('Heading classes'),
      '#type' => 'textfield',
      '#default_value' => $this->settings['title_classes'],
      '#description' => t('Additional classes to be added to the page title.'),
    );
  }

  if ($this->childDelta == 'title_combo' || $this->childDelta == 'tabs') {
    $form['tabs'] = array(
      '#type' => 'fieldset',
      '#title' => t('Local task tabs'),
    );
    $form['tabs']['tab_type'] = array(
      '#title' => t('Tabs type'),
      '#type' => 'select',
      '#options' => array(
        'both' => t('Primary and secondary'),
        'primary' => t('Primary'),
        'secondary' => t('Secondary'),
        'hidden' => t('Hidden'),
      ),
      '#default_value' => $this->settings['tab_type'],
      '#description' => t('Tabs are commonly used to show links for editing content, viewing revisions, and accessing sub-pages of configuration.
'),
    );
  }
}