7e867c04538dfc6375d5a2fe6bc52ec392721e82
[yaffs-website] / web / core / modules / comment / src / Plugin / Action / UnpublishComment.php
1 <?php
2
3 namespace Drupal\comment\Plugin\Action;
4
5 use Drupal\Core\Action\Plugin\Action\UnpublishAction;
6 use Drupal\Core\Entity\EntityTypeManagerInterface;
7
8 /**
9  * Unpublishes a comment.
10  *
11  * @deprecated in Drupal 8.5.x, to be removed before Drupal 9.0.0.
12  *   Use \Drupal\Core\Action\Plugin\Action\UnpublishAction instead.
13  *
14  * @see \Drupal\Core\Action\Plugin\Action\UnpublishAction
15  * @see https://www.drupal.org/node/2919303
16  *
17  * @Action(
18  *   id = "comment_unpublish_action",
19  *   label = @Translation("Unpublish comment"),
20  *   type = "comment"
21  * )
22  */
23 class UnpublishComment extends UnpublishAction {
24
25   /**
26    * {@inheritdoc}
27    */
28   public function __construct($configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager) {
29     parent::__construct($configuration, $plugin_id, $plugin_definition, $entity_type_manager);
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);
31   }
32
33 }