X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fcomment%2Fsrc%2FForm%2FCommentAdminOverview.php;h=3b97d0d1c48b511ca2bf14df19c2da998f59649e;hb=1c1cb0980bfa6caf0c24cce671b6bb541dc87583;hp=b18bf3d0b0c6be258c09d8839a4e739f16686f35;hpb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;p=yaffs-website diff --git a/web/core/modules/comment/src/Form/CommentAdminOverview.php b/web/core/modules/comment/src/Form/CommentAdminOverview.php index b18bf3d0b..3b97d0d1c 100644 --- a/web/core/modules/comment/src/Form/CommentAdminOverview.php +++ b/web/core/modules/comment/src/Form/CommentAdminOverview.php @@ -9,11 +9,13 @@ use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Form\FormBase; use Drupal\Core\Form\FormStateInterface; -use Drupal\user\PrivateTempStoreFactory; +use Drupal\Core\TempStore\PrivateTempStoreFactory; use Symfony\Component\DependencyInjection\ContainerInterface; /** * Provides the comments overview administration form. + * + * @internal */ class CommentAdminOverview extends FormBase { @@ -48,7 +50,7 @@ class CommentAdminOverview extends FormBase { /** * The tempstore factory. * - * @var \Drupal\user\PrivateTempStoreFactory + * @var \Drupal\Core\TempStore\PrivateTempStoreFactory */ protected $tempStoreFactory; @@ -61,7 +63,7 @@ class CommentAdminOverview extends FormBase { * The date formatter service. * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler * The module handler. - * @param \Drupal\user\PrivateTempStoreFactory $temp_store_factory + * @param \Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory * The tempstore factory. */ public function __construct(EntityTypeManagerInterface $entity_type_manager, DateFormatterInterface $date_formatter, ModuleHandlerInterface $module_handler, PrivateTempStoreFactory $temp_store_factory) { @@ -80,7 +82,7 @@ class CommentAdminOverview extends FormBase { $container->get('entity_type.manager'), $container->get('date.formatter'), $container->get('module_handler'), - $container->get('user.private_tempstore') + $container->get('tempstore.private') ); } @@ -277,7 +279,7 @@ class CommentAdminOverview extends FormBase { } $comment->save(); } - drupal_set_message($this->t('The update has been performed.')); + $this->messenger()->addStatus($this->t('The update has been performed.')); $form_state->setRedirect('comment.admin'); } else { @@ -288,9 +290,9 @@ class CommentAdminOverview extends FormBase { $info[$comment->id()][$langcode] = $langcode; } $this->tempStoreFactory - ->get('comment_multiple_delete_confirm') - ->set($this->currentUser()->id(), $info); - $form_state->setRedirect('comment.multiple_delete_confirm'); + ->get('entity_delete_multiple_confirm') + ->set($this->currentUser()->id() . ':comment', $info); + $form_state->setRedirect('entity.comment.delete_multiple_form'); } }