UpdateHookRegistryFactory.php

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

Namespace

Drupal\Core\Update

File

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

View source
<?php

namespace Drupal\Core\Update;

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

/**
 * Service factory for the versioning update registry.
 */
class UpdateHookRegistryFactory implements ContainerAwareInterface {
    use ContainerAwareTrait;
    
    /**
     * Creates a new UpdateHookRegistry instance.
     *
     * @return \Drupal\Core\Update\UpdateHookRegistry
     *   The update registry instance.
     */
    public function create() {
        return new UpdateHookRegistry(array_keys($this->container
            ->get('module_handler')
            ->getModuleList()), $this->container
            ->get('keyvalue')
            ->get('system.schema'));
    }

}

Classes

Title Deprecated Summary
UpdateHookRegistryFactory Service factory for the versioning update registry.

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