You are here

public function SlickManager::typecast in Slick Carousel 7.3

Typecast the needed settings, blazy-related module can override.

Performance wise, typecasting should be at the form submit as calling self::config() can be called multiple times. See sample below.

Overrides BlazyManagerBase::typecast

See also

Drupal\blazy_ui\Form\BlazySettingsForm::submitForm()

Drupal\slick_ui\Form\SlickSettingsForm::submitForm()

File

src/SlickManager.php, line 67

Class

SlickManager
Implements SlickManagerInterface.

Namespace

Drupal\slick

Code

public function typecast(array &$config, $id = 'slick.settings') {
  if ($id == 'slick.settings') {
    foreach (SlickDefault::formSettings() as $key => $value) {
      if (isset($config[$key])) {
        settype($config[$key], gettype($value));
      }
    }
  }
}