comparison core/modules/language/src/LanguageListBuilder.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents a9cd425dd02b
children
comparison
equal deleted inserted replaced
4:a9cd425dd02b 5:12f9dff5fda9
49 * {@inheritdoc} 49 * {@inheritdoc}
50 */ 50 */
51 public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) { 51 public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) {
52 return new static( 52 return new static(
53 $entity_type, 53 $entity_type,
54 $container->get('entity.manager')->getStorage($entity_type->id()), 54 $container->get('entity_type.manager')->getStorage($entity_type->id()),
55 $container->get('language_manager'), 55 $container->get('language_manager'),
56 $container->get('config.factory'), 56 $container->get('config.factory'),
57 $container->get('messenger') 57 $container->get('messenger')
58 ); 58 );
59 } 59 }
167 } 167 }
168 168
169 $this->messenger->addStatus($this->t('Configuration saved.')); 169 $this->messenger->addStatus($this->t('Configuration saved.'));
170 // Force the redirection to the page with the language we have just 170 // Force the redirection to the page with the language we have just
171 // selected as default. 171 // selected as default.
172 $form_state->setRedirectUrl($this->entities[$new_id]->urlInfo('collection', ['language' => $this->entities[$new_id]])); 172 $form_state->setRedirectUrl($this->entities[$new_id]->toUrl('collection', ['language' => $this->entities[$new_id]]));
173 } 173 }
174 174
175 } 175 }