file CdnCacheTtlAssets.php

Namespace

Drupal\bootstrap\Plugin\Setting\Advanced\Cdn
  1. <?php
  2. namespace Drupal\bootstrap\Plugin\Setting\Advanced\Cdn;
  3. use Drupal\bootstrap\Plugin\Provider\ProviderInterface;
  4. use Drupal\Core\Form\FormStateInterface;
  5. /**
  6. * Due to BC reasons, this class cannot be moved.
  7. *
  8. * @todo Move namespace up one.
  9. */
  10. /**
  11. * The "cdn_cache_ttl_assets" theme setting.
  12. *
  13. * @ingroup plugins_setting
  14. *
  15. * @BootstrapSetting(
  16. * id = "cdn_cache_ttl_assets",
  17. * type = "select",
  18. * weight = 3,
  19. * title = @Translation("Asset Processing"),
  20. * description = @Translation("The length of time to cache the parsing and processing of CDN assets before rebuilding them again. Note: any change to CDN values automatically triggers a new build."),
  21. * defaultValue = \Drupal\bootstrap\Plugin\Provider\ProviderInterface::TTL_FOREVER,
  22. * groups = {
  23. * "cdn" = @Translation("CDN (Content Delivery Network)"),
  24. * "cdn_provider" = false,
  25. * "cache" = @Translation("Advanced Cache"),
  26. * },
  27. * )
  28. */
  29. class CdnCacheTtlAssets extends CdnCacheTtlBase {
  30. /**
  31. * {@inheritdoc}
  32. */
  33. protected function getSettingValue(FormStateInterface $form_state) {
  34. return $this->getProvider()->getCacheTtl(ProviderInterface::CACHE_ASSETS);
  35. }
  36. }

Classes

Name Description
CdnCacheTtlAssets The "cdn_cache_ttl_assets" theme setting.