annotate core/modules/user/src/UserServiceProvider.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 1fec387a4317
children
rev   line source
Chris@0 1 <?php
Chris@14 2
Chris@0 3 namespace Drupal\user;
Chris@14 4
Chris@14 5 use Drupal\Core\DependencyInjection\ContainerBuilder;
Chris@14 6 use Drupal\Core\DependencyInjection\ServiceModifierInterface;
Chris@14 7
Chris@14 8 class UserServiceProvider implements ServiceModifierInterface {
Chris@14 9
Chris@14 10 /**
Chris@14 11 * {@inheritdoc}
Chris@14 12 */
Chris@14 13 public function alter(ContainerBuilder $container) {
Chris@14 14 if ($container->hasParameter('user.tempstore.expire')) {
Chris@14 15 @trigger_error('The container parameter "user.tempstore.expire" is deprecated. Use "tempstore.expire" instead. See https://www.drupal.org/node/2935639.', E_USER_DEPRECATED);
Chris@14 16 $container->setParameter('tempstore.expire', $container->getParameter('user.tempstore.expire'));
Chris@14 17 }
Chris@14 18 else {
Chris@14 19 // Ensure the user.tempstore.expire parameter is set to the same value
Chris@14 20 // for modules that still rely on it.
Chris@14 21 $container->setParameter('user.tempstore.expire', $container->getParameter('tempstore.expire'));
Chris@14 22 }
Chris@14 23 }
Chris@14 24
Chris@14 25 }