Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AnnounceFetcher.php

function AnnounceFetcher::isRelevantItem

Check whether the version given is relevant to the Drupal version used.

Parameters

string $version: Version to check.

Return value

bool Return True if the version matches Drupal version.

1 call to AnnounceFetcher::isRelevantItem()
AnnounceFetcher::fetch in core/modules/announcements_feed/src/AnnounceFetcher.php
Fetches the feed either from a local cache or fresh remotely.

File

core/modules/announcements_feed/src/AnnounceFetcher.php, line 82

Class

AnnounceFetcher
Service to fetch announcements from the external feed.

Namespace

Drupal\announcements_feed

Code

protected static function isRelevantItem(string $version) : bool {
    return !empty($version) && Semver::satisfies(\Drupal::VERSION, $version);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal