function UpdateManagerInterface::calculateProjectData

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

Calculates the current update status of all projects on the site.

The results of this method are expensive to compute, especially on sites with lots of modules or themes, since it involves a lot of comparisons and other operations. Therefore, we store the results. However, since this is not the data about available updates fetched from the network, it is ok to invalidate it somewhat quickly. If we keep this data for very long, site administrators are more likely to see incorrect results if they upgrade to a newer version of a module or theme but do not visit certain pages that automatically clear this.

Parameters

array $available: Data about available project releases.

Return value

array An array of installed projects with current update status information.

See also

\Drupal\update\UpdateManagerInterface::getAvailable()

\Drupal\update\UpdateManagerInterface::getProjects()

\Drupal\update\UpdateCalculator::processProjectInfo()

\Drupal\update\UpdateManagerInterface::projectStorage()

\Drupal\update\ProjectCoreCompatibility::setReleaseMessage()

File

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

Class

UpdateManagerInterface
Manages project update information.

Namespace

Drupal\update

Code

public function calculateProjectData(array $available) : array;

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