comparison core/modules/comment/src/Plugin/Action/UnpublishComment.php @ 0:c75dbcec494b

Initial commit from drush-created site
author Chris Cannam
date Thu, 05 Jul 2018 14:24:15 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:c75dbcec494b
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 }