You are here

function _ultimenu_block_configure in Ultimenu 7

Implements hook_block_configure().

1 call to _ultimenu_block_configure()
ultimenu_block_configure in ./ultimenu.module
Implements hook_block_configure().

File

includes/ultimenu.admin.inc, line 180
The setting for Ultimenu.

Code

function _ultimenu_block_configure($delta = '') {
  $form = array();
  if (user_access('administer ultimenu')) {
    $form['ultimenu_settings'] = array(
      '#type' => 'fieldset',
      '#title' => t('Block settings'),
    );
    $safe_delta = ultimenu_truncate_menu_property($delta);

    // TRUE to keep original skin array without being converted to full URL.
    // @see ultimenu_get_skins()
    $config = ultimenu_get_config($delta, TRUE);
    $skin = $config['skin'];
    $orientation = $config['orientation'];
    $form['ultimenu_settings']['skin_' . $safe_delta] = array(
      '#type' => 'select',
      '#title' => t('Ultimenu skin'),
      '#default_value' => !empty($skin) ? $skin : 'module|ultimenu-basic.css',
      '#options' => ultimenu_get_skins(),
      '#empty_option' => t('- None -'),
      '#description' => t('Choose the skin for this block. You can supply custom skins at <a href="@skin_path">Ultimenu settings</a>. The skin can be made specific to this block using the proper class by menu name as used by each label.', array(
        '@skin_path' => url('admin/structure/ultimenu'),
      )),
    );
    $form['ultimenu_settings']['orientation_' . $safe_delta] = array(
      '#type' => 'select',
      '#title' => t('Flyout orientation'),
      '#default_value' => !empty($orientation) ? $orientation : 'ultimenu-htb',
      '#options' => array(
        'ultimenu-htb' => t('Horizontal to bottom'),
        'ultimenu-htt' => t('Horizontal to top'),
        'ultimenu-vtl' => t('Vertical to left'),
        'ultimenu-vtr' => t('Vertical to right'),
      ),
      '#description' => t('Choose the orientation of the flyout, dependent on the placement. At sidebar left, <strong>Vertical to right</strong>. At header, <strong>Horizontal to bottom</strong>. At footer, <strong>Horizontal to top</strong>'),
    );
  }
  return $form;
}