public function Theme::getPendingUpdates in Express 8
Retrieves pending updates for the theme.
Return value
\Drupal\bootstrap\Plugin\Update\UpdateInterface[] An array of update plugin objects.
File
- themes/
contrib/ bootstrap/ src/ Theme.php, line 443 - Contains \Drupal\bootstrap.
Class
- Theme
- Defines a theme object.
Namespace
Drupal\bootstrapCode
public function getPendingUpdates() {
$pending = [];
// Only continue if the theme is Bootstrap based.
if ($this
->isBootstrap()) {
$current_theme = $this
->getName();
$schemas = $this
->getSetting('schemas', []);
foreach ($this
->getAncestry() as $ancestor) {
$ancestor_name = $ancestor
->getName();
if (!isset($schemas[$ancestor_name])) {
$schemas[$ancestor_name] = \Drupal::CORE_MINIMUM_SCHEMA_VERSION;
$this
->setSetting('schemas', $schemas);
}
$pending_updates = $ancestor
->getUpdateManager()
->getPendingUpdates($current_theme === $ancestor_name);
foreach ($pending_updates as $schema => $update) {
if ((int) $schema > (int) $schemas[$ancestor_name]) {
$pending[] = $update;
}
}
}
}
return $pending;
}