function UpdateRegistryFactory::create

Same name in other branches
  1. 9 core/lib/Drupal/Core/Update/UpdateRegistryFactory.php \Drupal\Core\Update\UpdateRegistryFactory::create()
  2. 8.9.x core/lib/Drupal/Core/Update/UpdateRegistryFactory.php \Drupal\Core\Update\UpdateRegistryFactory::create()
  3. 10 core/lib/Drupal/Core/Update/UpdateRegistryFactory.php \Drupal\Core\Update\UpdateRegistryFactory::create()

Creates a new UpdateRegistry instance.

Return value

\Drupal\Core\Update\UpdateRegistry The update registry instance.

File

core/lib/Drupal/Core/Update/UpdateRegistryFactory.php, line 21

Class

UpdateRegistryFactory
Service factory for the update registry.

Namespace

Drupal\Core\Update

Code

public function create() {
    $extensions = array_merge(array_keys($this->container
        ->get('module_handler')
        ->getModuleList()), array_keys($this->container
        ->get('theme_handler')
        ->listInfo()));
    return new UpdateRegistry($this->container
        ->getParameter('app.root'), $this->container
        ->getParameter('site.path'), $extensions, $this->container
        ->get('keyvalue')
        ->get('post_update'));
}

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