You are here

function superfish_effects in Superfish 8

Same name and namespace in other branches
  1. 7 superfish.module \superfish_effects()

Generate a list of available slide-in effects.

1 call to superfish_effects()
SuperfishBlock::blockForm in src/Plugin/Block/SuperfishBlock.php
Overrides \Drupal\block\BlockBase::blockForm().

File

./superfish.module, line 285
The jQuery Superfish plugin for Drupal menus.

Code

function superfish_effects() {
  $output = [
    'none' => '- ' . t('None') . ' -',
    'vertical' => t('Vertical'),
    'horizontal' => t('Horizontal'),
    'diagonal' => t('Diagonal'),
  ];
  if (superfish_library_path('easing')) {
    $easing_types = [
      'easeInSine_vertical' => 'easeInSine (' . t('Vertical') . ')',
      'easeInSine_horizontal' => 'easeInSine (' . t('Horizontal') . ')',
      'easeInSine_diagonal' => 'easeInSine (' . t('Diagonal') . ')',
      'easeInQuint_vertical' => 'easeInQuint (' . t('Vertical') . ')',
      'easeInQuint_horizontal' => 'easeInQuint (' . t('Horizontal') . ')',
      'easeInQuint_diagonal' => 'easeInQuint (' . t('Diagonal') . ')',
      'easeInQuart_vertical' => 'easeInQuart (' . t('Vertical') . ')',
      'easeInQuart_horizontal' => 'easeInQuart (' . t('Horizontal') . ')',
      'easeInQuart_diagonal' => 'easeInQuart (' . t('Diagonal') . ')',
      'easeInQuad_vertical' => 'easeInQuad (' . t('Vertical') . ')',
      'easeInQuad_horizontal' => 'easeInQuad (' . t('Horizontal') . ')',
      'easeInQuad_diagonal' => 'easeInQuad (' . t('Diagonal') . ')',
      'easeInExpo_vertical' => 'easeInExpo (' . t('Vertical') . ')',
      'easeInExpo_horizontal' => 'easeInExpo (' . t('Horizontal') . ')',
      'easeInExpo_diagonal' => 'easeInExpo (' . t('Diagonal') . ')',
      'easeInElastic_vertical' => 'easeInElastic (' . t('Vertical') . ')',
      'easeInElastic_horizontal' => 'easeInElastic (' . t('Horizontal') . ')',
      'easeInElastic_diagonal' => 'easeInElastic (' . t('Diagonal') . ')',
      'easeInCubic_vertical' => 'easeInCubic (' . t('Vertical') . ')',
      'easeInCubic_horizontal' => 'easeInCubic (' . t('Horizontal') . ')',
      'easeInCubic_diagonal' => 'easeInCubic (' . t('Diagonal') . ')',
      'easeInCirc_vertical' => 'easeInCirc (' . t('Vertical') . ')',
      'easeInCirc_horizontal' => 'easeInCirc (' . t('Horizontal') . ')',
      'easeInCirc_diagonal' => 'easeInCirc (' . t('Diagonal') . ')',
      'easeInBounce_vertical' => 'easeInBounce (' . t('Vertical') . ')',
      'easeInBounce_horizontal' => 'easeInBounce (' . t('Horizontal') . ')',
      'easeInBounce_diagonal' => 'easeInBounce (' . t('Diagonal') . ')',
      'easeInBack_vertical' => 'easeInBack (' . t('Vertical') . ')',
      'easeInBack_horizontal' => 'easeInBack (' . t('Horizontal') . ')',
      'easeInBack_diagonal' => 'easeInBack (' . t('Diagonal') . ')',
    ];
    $output = array_merge($output, $easing_types);
  }
  return $output;
}