function UpdateManagerInterface::getAvailable

Same name and namespace in other branches
  1. main core/modules/update/src/UpdateManagerInterface.php \Drupal\update\UpdateManagerInterface::getAvailable()

Tries to get update information and refreshes it when necessary.

In addition to checking the lifetime, this function also ensures that there are no .info.yml files for installed modules or themes that have a newer modification timestamp than the last time we checked for available update data. If any .info.yml file was modified, it almost certainly means a new version of something was installed. Without fresh available update data, the logic in update_calculate_project_data() will be wrong and produce confusing, bogus results.

Parameters

bool $refresh: (optional) Boolean to indicate if this method should refresh automatically if there's no data. Defaults to FALSE.

Return value

array Array of data about available releases, keyed by project shortname.

See also

\Drupal\update\UpdateManagerInterface::refreshUpdateData()

\Drupal\update\UpdateManagerInterface::getProjects()

File

core/modules/update/src/UpdateManagerInterface.php, line 154

Class

UpdateManagerInterface
Manages project update information.

Namespace

Drupal\update

Code

public function getAvailable(bool $refresh) : array;

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.