annotate core/modules/comment/src/Plugin/Action/UnpublishComment.php @ 5:12f9dff5fda9
tip
Update to Drupal core 8.7.1
author |
Chris Cannam |
date |
Thu, 09 May 2019 15:34:47 +0100 |
parents |
c75dbcec494b |
children |
|
rev |
line source |
Chris@0
|
1 <?php
|
Chris@0
|
2
|
Chris@0
|
3 namespace Drupal\comment\Plugin\Action;
|
Chris@0
|
4
|
Chris@0
|
5 use Drupal\Core\Action\Plugin\Action\UnpublishAction;
|
Chris@0
|
6 use Drupal\Core\Entity\EntityTypeManagerInterface;
|
Chris@0
|
7
|
Chris@0
|
8 /**
|
Chris@0
|
9 * Unpublishes a comment.
|
Chris@0
|
10 *
|
Chris@0
|
11 * @deprecated in Drupal 8.5.x, to be removed before Drupal 9.0.0.
|
Chris@0
|
12 * Use \Drupal\Core\Action\Plugin\Action\UnpublishAction instead.
|
Chris@0
|
13 *
|
Chris@0
|
14 * @see \Drupal\Core\Action\Plugin\Action\UnpublishAction
|
Chris@0
|
15 * @see https://www.drupal.org/node/2919303
|
Chris@0
|
16 *
|
Chris@0
|
17 * @Action(
|
Chris@0
|
18 * id = "comment_unpublish_action",
|
Chris@0
|
19 * label = @Translation("Unpublish comment"),
|
Chris@0
|
20 * type = "comment"
|
Chris@0
|
21 * )
|
Chris@0
|
22 */
|
Chris@0
|
23 class UnpublishComment extends UnpublishAction {
|
Chris@0
|
24
|
Chris@0
|
25 /**
|
Chris@0
|
26 * {@inheritdoc}
|
Chris@0
|
27 */
|
Chris@0
|
28 public function __construct($configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager) {
|
Chris@0
|
29 parent::__construct($configuration, $plugin_id, $plugin_definition, $entity_type_manager);
|
Chris@0
|
30 @trigger_error(__NAMESPACE__ . '\UnpublishComment is deprecated in Drupal 8.5.x, will be removed before Drupal 9.0.0. Use \Drupal\Core\Action\Plugin\Action\UnpublishAction instead. See https://www.drupal.org/node/2919303.', E_USER_DEPRECATED);
|
Chris@0
|
31 }
|
Chris@0
|
32
|
Chris@0
|
33 }
|