UpdateRegistryFactory.php

Same filename in other branches
  1. 9 core/lib/Drupal/Core/Update/UpdateRegistryFactory.php
  2. 10 core/lib/Drupal/Core/Update/UpdateRegistryFactory.php
  3. 11.x core/lib/Drupal/Core/Update/UpdateRegistryFactory.php

Namespace

Drupal\Core\Update

File

core/lib/Drupal/Core/Update/UpdateRegistryFactory.php

View source
<?php

namespace Drupal\Core\Update;

use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;

/**
 * Service factory for the update registry.
 */
class UpdateRegistryFactory implements ContainerAwareInterface {
    use ContainerAwareTrait;
    
    /**
     * Creates a new UpdateRegistry instance.
     *
     * @return \Drupal\Core\Update\UpdateRegistry
     *   The update registry instance.
     */
    public function create() {
        return new UpdateRegistry($this->container
            ->get('app.root'), $this->container
            ->get('site.path'), array_keys($this->container
            ->get('module_handler')
            ->getModuleList()), $this->container
            ->get('keyvalue')
            ->get('post_update'));
    }

}

Classes

Title Deprecated Summary
UpdateRegistryFactory Service factory for the update registry.

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