final class ProjectRelease (View source)

Provides a project release value object.

Methods

static ProjectRelease
createFromArray(array $release_data)

Creates a ProjectRelease instance from an array.

string
getVersion()

Gets the project version.

int|null
getDate()

Gets the release date if set.

bool
isSecurityRelease()

Determines if the release is a security release.

bool
isUnsupported()

Determines if the release is unsupported.

bool
isInsecure()

Determines if the release is insecure.

bool
isPublished()

Determines if the release is published.

bool|null
isCoreCompatible()

Determines whether release is compatible the site's version of Drupal core.

string|null
getCoreCompatibilityMessage()

Gets the core compatibility message for the site's version of Drupal core.

string|null
getDownloadUrl()

Gets the download URL of the release.

string
getReleaseUrl()

Gets the URL of the release.

Details

static ProjectRelease createFromArray(array $release_data)

Creates a ProjectRelease instance from an array.

Parameters

array $release_data

The project release data as returned by update_get_available().

Return Value

ProjectRelease

The ProjectRelease instance.

Exceptions

UnexpectedValueException

See also

update_get_available()

string getVersion()

Gets the project version.

Return Value

string

The project version.

int|null getDate()

Gets the release date if set.

Return Value

int|null

The date of the release or null if no date is available.

bool isSecurityRelease()

Determines if the release is a security release.

Return Value

bool

TRUE if the release is security release, or FALSE otherwise.

bool isUnsupported()

Determines if the release is unsupported.

Return Value

bool

TRUE if the release is unsupported, or FALSE otherwise.

bool isInsecure()

Determines if the release is insecure.

Return Value

bool

TRUE if the release is insecure, or FALSE otherwise.

bool isPublished()

Determines if the release is published.

Return Value

bool

TRUE if the release is published, or FALSE otherwise.

bool|null isCoreCompatible()

Determines whether release is compatible the site's version of Drupal core.

Return Value

bool|null

Whether the release is compatible or NULL if no data is set.

string|null getCoreCompatibilityMessage()

Gets the core compatibility message for the site's version of Drupal core.

Return Value

string|null

The core compatibility message or NULL if none is available.

string|null getDownloadUrl()

Gets the download URL of the release.

Return Value

string|null

The download URL or NULL if none is available.

string getReleaseUrl()

Gets the URL of the release.

Return Value

string

The URL of the release.