class UpdateRegistryFactory

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

Service factory for the update registry.

Hierarchy

  • class \Drupal\Core\Update\UpdateRegistryFactory implements \Symfony\Component\DependencyInjection\ContainerAwareInterface uses \Symfony\Component\DependencyInjection\ContainerAwareTrait

Expanded class hierarchy of UpdateRegistryFactory

File

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

Namespace

Drupal\Core\Update
View source
class UpdateRegistryFactory implements ContainerAwareInterface {
    use ContainerAwareTrait;
    
    /**
     * Creates a new UpdateRegistry instance.
     *
     * @return \Drupal\Core\Update\UpdateRegistry
     *   The update registry instance.
     */
    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'));
    }

}

Members

Title Sort descending Modifiers Object type Summary
UpdateRegistryFactory::create public function Creates a new UpdateRegistry instance.

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