function public static function CdnProvider::submitResetProviderCache

8.x-3.x CdnProvider.php public static CdnProvider::submitResetProviderCache(array $form, FormStateInterface $form_state)

Submit callback for resetting CDN Provider cache.

Parameters

array $form: Nested array of form elements that comprise the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Class

CdnProvider
The "cdn_provider" theme setting.

Namespace

Drupal\bootstrap\Plugin\Setting\Advanced\Cdn

Source src/Plugin/Setting/Advanced/Cdn/CdnProvider.php (line 156)

public static function submitResetProviderCache(array $form, FormStateInterface $form_state) {
  $form_state->setRebuild();
  $theme = SystemThemeSettings::getTheme(Element::create($form), $form_state);
  $provider = ProviderManager::load($theme, $form_state->getValue('cdn_provider', $theme->getSetting('cdn_provider')));
  $provider->resetCache();
}