annotate core/modules/user/src/UserServiceProvider.php @ 0:c75dbcec494b

Initial commit from drush-created site
author Chris Cannam
date Thu, 05 Jul 2018 14:24:15 +0000
parents
children
rev   line source
Chris@0 1 <?php
Chris@0 2
Chris@0 3 namespace Drupal\user;
Chris@0 4
Chris@0 5 use Drupal\Core\DependencyInjection\ContainerBuilder;
Chris@0 6 use Drupal\Core\DependencyInjection\ServiceModifierInterface;
Chris@0 7
Chris@0 8 class UserServiceProvider implements ServiceModifierInterface {
Chris@0 9
Chris@0 10 /**
Chris@0 11 * {@inheritdoc}
Chris@0 12 */
Chris@0 13 public function alter(ContainerBuilder $container) {
Chris@0 14 if ($container->hasParameter('user.tempstore.expire')) {
Chris@0 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@0 16 $container->setParameter('tempstore.expire', $container->getParameter('user.tempstore.expire'));
Chris@0 17 }
Chris@0 18 else {
Chris@0 19 // Ensure the user.tempstore.expire parameter is set to the same value
Chris@0 20 // for modules that still rely on it.
Chris@0 21 $container->setParameter('user.tempstore.expire', $container->getParameter('tempstore.expire'));
Chris@0 22 }
Chris@0 23 }
Chris@0 24
Chris@0 25 }