UpdateRegistryFactory.php 724 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace Drupal\Core\Update;
  3. use Symfony\Component\DependencyInjection\ContainerAwareInterface;
  4. use Symfony\Component\DependencyInjection\ContainerAwareTrait;
  5. /**
  6. * Service factory for the update registry.
  7. */
  8. class UpdateRegistryFactory implements ContainerAwareInterface {
  9. use ContainerAwareTrait;
  10. /**
  11. * Creates a new UpdateRegistry instance.
  12. *
  13. * @return \Drupal\Core\Update\UpdateRegistry
  14. * The update registry instance.
  15. */
  16. public function create() {
  17. 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'));
  18. }
  19. }