file CdnJsdelivrVersion.php

Namespace

Drupal\bootstrap\Plugin\Setting\Advanced\Cdn
  1. <?php
  2. namespace Drupal\bootstrap\Plugin\Setting\Advanced\Cdn;
  3. /**
  4. * Due to BC reasons, this class cannot be moved.
  5. *
  6. * @todo Move namespace up one.
  7. */
  8. use Drupal\bootstrap\Plugin\Setting\DeprecatedSettingInterface;
  9. /**
  10. * The "cdn_jsdelivr_version" theme setting.
  11. *
  12. * @BootstrapSetting(
  13. * cdn_provider = "jsdelivr",
  14. * id = "cdn_jsdelivr_version",
  15. * type = "select",
  16. * weight = -1,
  17. * title = @Translation("Version"),
  18. * description = @Translation("Choose the Bootstrap version from jsdelivr"),
  19. * defaultValue = @BootstrapConstant("Drupal\bootstrap\Bootstrap::FRAMEWORK_VERSION"),
  20. * groups = {
  21. * "cdn" = @Translation("CDN (Content Delivery Network)"),
  22. * "cdn_provider" = false,
  23. * "jsdelivr" = false,
  24. * },
  25. * )
  26. *
  27. * @deprecated since 8.x-3.18. Replaced with new setting. Will be removed in a
  28. * future release.
  29. *
  30. * @see \Drupal\bootstrap\Plugin\Setting\Advanced\Cdn\CdnVersion
  31. */
  32. class CdnJsdelivrVersion extends CdnProviderBase implements DeprecatedSettingInterface {
  33. /**
  34. * {@inheritdoc}
  35. */
  36. public function getDeprecatedReason() {
  37. return $this->t('Replaced with new setting. Will be removed in a future release.');
  38. }
  39. /**
  40. * {@inheritdoc}
  41. */
  42. public function getDeprecatedReplacement() {
  43. return '\Drupal\bootstrap\Plugin\Setting\Advanced\Cdn\CdnVersion';
  44. }
  45. /**
  46. * {@inheritdoc}
  47. */
  48. public function getDeprecatedReplacementSetting() {
  49. return $this->theme->getSettingPlugin('cdn_version');
  50. }
  51. /**
  52. * {@inheritdoc}
  53. */
  54. public function getDeprecatedVersion() {
  55. return '8.x-3.18';
  56. }
  57. }

Classes

Name Description
CdnJsdelivrVersion The "cdn_jsdelivr_version" theme setting.