Mercurial > hg > isophonics-drupal-site
comparison core/modules/comment/src/Plugin/Action/DeleteComment.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | 4c8ae668cc8c |
children | 129ea1e6d783 |
comparison
equal
deleted
inserted
replaced
13:5fb285c0d0e3 | 14:1fec387a4317 |
---|---|
3 namespace Drupal\comment\Plugin\Action; | 3 namespace Drupal\comment\Plugin\Action; |
4 | 4 |
5 use Drupal\Core\Action\ActionBase; | 5 use Drupal\Core\Action\ActionBase; |
6 use Drupal\Core\Plugin\ContainerFactoryPluginInterface; | 6 use Drupal\Core\Plugin\ContainerFactoryPluginInterface; |
7 use Drupal\Core\Session\AccountInterface; | 7 use Drupal\Core\Session\AccountInterface; |
8 use Drupal\user\PrivateTempStoreFactory; | 8 use Drupal\Core\TempStore\PrivateTempStoreFactory; |
9 use Symfony\Component\DependencyInjection\ContainerInterface; | 9 use Symfony\Component\DependencyInjection\ContainerInterface; |
10 | 10 |
11 /** | 11 /** |
12 * Deletes a comment. | 12 * Deletes a comment. |
13 * | 13 * |
21 class DeleteComment extends ActionBase implements ContainerFactoryPluginInterface { | 21 class DeleteComment extends ActionBase implements ContainerFactoryPluginInterface { |
22 | 22 |
23 /** | 23 /** |
24 * The tempstore object. | 24 * The tempstore object. |
25 * | 25 * |
26 * @var \Drupal\user\PrivateTempStore | 26 * @var \Drupal\Core\TempStore\PrivateTempStore |
27 */ | 27 */ |
28 protected $tempStore; | 28 protected $tempStore; |
29 | 29 |
30 /** | 30 /** |
31 * The current user. | 31 * The current user. |
41 * A configuration array containing information about the plugin instance. | 41 * A configuration array containing information about the plugin instance. |
42 * @param string $plugin_id | 42 * @param string $plugin_id |
43 * The plugin ID for the plugin instance. | 43 * The plugin ID for the plugin instance. |
44 * @param array $plugin_definition | 44 * @param array $plugin_definition |
45 * The plugin implementation definition. | 45 * The plugin implementation definition. |
46 * @param \Drupal\user\PrivateTempStoreFactory $temp_store_factory | 46 * @param \Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory |
47 * The tempstore factory. | 47 * The tempstore factory. |
48 * @param \Drupal\Core\Session\AccountInterface $current_user | 48 * @param \Drupal\Core\Session\AccountInterface $current_user |
49 * The current user. | 49 * The current user. |
50 */ | 50 */ |
51 public function __construct(array $configuration, $plugin_id, array $plugin_definition, PrivateTempStoreFactory $temp_store_factory, AccountInterface $current_user) { | 51 public function __construct(array $configuration, $plugin_id, array $plugin_definition, PrivateTempStoreFactory $temp_store_factory, AccountInterface $current_user) { |
60 public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { | 60 public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { |
61 return new static( | 61 return new static( |
62 $configuration, | 62 $configuration, |
63 $plugin_id, | 63 $plugin_id, |
64 $plugin_definition, | 64 $plugin_definition, |
65 $container->get('user.private_tempstore'), | 65 $container->get('tempstore.private'), |
66 $container->get('current_user') | 66 $container->get('current_user') |
67 ); | 67 ); |
68 } | 68 } |
69 | 69 |
70 /** | 70 /** |