You are here

function popup_ui_form_formatters in Popup 7

Same name and namespace in other branches
  1. 8 modules/popup_ui/includes/popup_ui.admin.inc \popup_ui_form_formatters()
  2. 7.x modules/popup_ui/includes/popup_ui.admin.inc \popup_ui_form_formatters()
  3. 6.x modules/popup_ui/includes/popup_ui.admin.inc \popup_ui_form_formatters()
1 string reference to 'popup_ui_form_formatters'
popup_ui_menu in modules/popup_ui/popup_ui.module
Implementation of hook_menu

File

modules/popup_ui/includes/popup_ui.admin.inc, line 9

Code

function popup_ui_form_formatters($form, &$form_state) {
  drupal_add_css(drupal_get_path('module', 'popup_ui') . '/style/popup-ui.css');
  drupal_add_css(drupal_get_path('module', 'popup_ui') . '/style/popup-ui.css');
  $options = _popup_ui_form_options();
  $formatters = _popup_ui_formatter_settings();
  $form = array(
    'popup_formats' => array(
      '#type' => 'vertical_tabs',
    ),
    '#tree' => TRUE,
    'format_forms' => array(),
  );
  foreach ($formatters as $label => $formatter) {
    $form['format_forms'][$label] = _popup_ui_form_formatters_form($label, $formatter, $options);
  }
  $form['format_forms']['new'] = _popup_ui_form_formatters_form('new', array(
    'origin' => 'bottom-left',
    'expand' => 'bottom-right',
    'effect' => 'none',
    'style' => 0,
    'activate' => 'hover',
  ), $options);
  $form['buttons'] = _popup_ui_form_buttons();
  return $form;
}