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. 11.x 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

Deprecated

in drupal:10.3.0 and is removed from drupal:11.0.0. Use \Drupal\Core\Update\UpdateRegistry instead.

See also

https://www.drupal.org/node/3423659

1 string reference to 'UpdateRegistryFactory'
core.services.yml in core/core.services.yml
core/core.services.yml
1 service uses UpdateRegistryFactory
update.post_update_registry_factory in core/core.services.yml
Drupal\Core\Update\UpdateRegistryFactory

File

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

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() {
        @trigger_error(__NAMESPACE__ . '\\UpdateHookRegistryFactory is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use \\Drupal\\Core\\Update\\UpdateRegistry instead. See https://www.drupal.org/node/3423659', E_USER_DEPRECATED);
        return new UpdateRegistry($this->container
            ->getParameter('app.root'), $this->container
            ->getParameter('site.path'), $this->container
            ->get('module_handler')
            ->getModuleList(), $this->container
            ->get('keyvalue')
            ->get('post_update'), $this->container
            ->get('theme_handler'));
    }

}

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.