comparison core/modules/comment/src/Form/CommentAdminOverview.php @ 4:a9cd425dd02b

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:11:55 +0000
parents c75dbcec494b
children 12f9dff5fda9
comparison
equal deleted inserted replaced
3:307d7a7fd348 4:a9cd425dd02b
277 elseif ($operation == 'publish') { 277 elseif ($operation == 'publish') {
278 $comment->setPublished(); 278 $comment->setPublished();
279 } 279 }
280 $comment->save(); 280 $comment->save();
281 } 281 }
282 drupal_set_message($this->t('The update has been performed.')); 282 $this->messenger()->addStatus($this->t('The update has been performed.'));
283 $form_state->setRedirect('comment.admin'); 283 $form_state->setRedirect('comment.admin');
284 } 284 }
285 else { 285 else {
286 $info = []; 286 $info = [];
287 /** @var \Drupal\comment\CommentInterface $comment */ 287 /** @var \Drupal\comment\CommentInterface $comment */
288 foreach ($comments as $comment) { 288 foreach ($comments as $comment) {
289 $langcode = $comment->language()->getId(); 289 $langcode = $comment->language()->getId();
290 $info[$comment->id()][$langcode] = $langcode; 290 $info[$comment->id()][$langcode] = $langcode;
291 } 291 }
292 $this->tempStoreFactory 292 $this->tempStoreFactory
293 ->get('comment_multiple_delete_confirm') 293 ->get('entity_delete_multiple_confirm')
294 ->set($this->currentUser()->id(), $info); 294 ->set($this->currentUser()->id() . ':comment', $info);
295 $form_state->setRedirect('comment.multiple_delete_confirm'); 295 $form_state->setRedirect('entity.comment.delete_multiple_form');
296 } 296 }
297 } 297 }
298 298
299 } 299 }