You are here

public function SlickFormBase::getBezier in Slick Carousel 8

Same name and namespace in other branches
  1. 8.2 slick_ui/src/Form/SlickFormBase.php \Drupal\slick_ui\Form\SlickFormBase::getBezier()
  2. 7.3 slick_ui/src/Form/SlickFormBase.php \Drupal\slick_ui\Form\SlickFormBase::getBezier()

Maps existing jQuery easing value to equivalent CSS easing methods.

Parameters

string $easing: The name of the human readable easing.

Return value

string A string of unfriendly bezier equivalent, or NULL.

1 call to SlickFormBase::getBezier()
SlickForm::validateForm in slick_ui/src/Form/SlickForm.php
Form validation handler.

File

slick_ui/src/Form/SlickFormBase.php, line 440

Class

SlickFormBase
Provides base form for a slick instance configuration form.

Namespace

Drupal\slick_ui\Form

Code

public function getBezier($easing = NULL) {
  $css_easing = '';
  if ($easing) {
    $easings = $this
      ->getCssEasingOptions(TRUE);
    list($readable_easing, $bezier) = array_pad(array_map('trim', explode("|", $easings[$easing], 2)), 2, NULL);
    $css_easing = $bezier;
    unset($readable_easing);
  }
  return $css_easing;
}