You are here

public function InstallableLibrary::isKnownVersion in Markdown 8.2

Indicates whether this is a known version.

Parameters

string $version: A specific version to test. If not specified, it will default to the currently installed version, if any.

Return value

bool TRUE or FALSE

3 calls to InstallableLibrary::isKnownVersion()
ComposerPackage::getVersionUrl in src/Annotation/ComposerPackage.php
Retrieves the version as a URL.
InstallableLibrary::getStatus in src/Annotation/InstallableLibrary.php
Retrieves the current status of the library.
PeclExtension::getVersionUrl in src/Annotation/PeclExtension.php
Retrieves the version as a URL.

File

src/Annotation/InstallableLibrary.php, line 326

Class

InstallableLibrary

Namespace

Drupal\markdown\Annotation

Code

public function isKnownVersion($version = NULL) {
  if (!isset($version)) {
    $version = $this->version;
  }
  return $version && in_array($version, $this
    ->getAvailableVersions(), TRUE);
}