annotate core/modules/node/src/Plugin/Action/SaveNode.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 |
|
rev |
line source |
Chris@0
|
1 <?php
|
Chris@0
|
2
|
Chris@0
|
3 namespace Drupal\node\Plugin\Action;
|
Chris@0
|
4
|
Chris@14
|
5 use Drupal\Component\Datetime\TimeInterface;
|
Chris@14
|
6 use Drupal\Core\Action\Plugin\Action\SaveAction;
|
Chris@14
|
7 use Drupal\Core\Entity\EntityTypeManagerInterface;
|
Chris@0
|
8
|
Chris@0
|
9 /**
|
Chris@0
|
10 * Provides an action that can save any entity.
|
Chris@0
|
11 *
|
Chris@14
|
12 * @deprecated in Drupal 8.5.x, to be removed before Drupal 9.0.0.
|
Chris@14
|
13 * Use \Drupal\Core\Action\Plugin\Action\SaveAction instead.
|
Chris@14
|
14 *
|
Chris@14
|
15 * @see \Drupal\Core\Action\Plugin\Action\SaveAction
|
Chris@14
|
16 * @see https://www.drupal.org/node/2919303
|
Chris@14
|
17 *
|
Chris@0
|
18 * @Action(
|
Chris@0
|
19 * id = "node_save_action",
|
Chris@0
|
20 * label = @Translation("Save content"),
|
Chris@0
|
21 * type = "node"
|
Chris@0
|
22 * )
|
Chris@0
|
23 */
|
Chris@14
|
24 class SaveNode extends SaveAction {
|
Chris@0
|
25
|
Chris@0
|
26 /**
|
Chris@0
|
27 * {@inheritdoc}
|
Chris@0
|
28 */
|
Chris@14
|
29 public function __construct($configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, TimeInterface $time) {
|
Chris@14
|
30 parent::__construct($configuration, $plugin_id, $plugin_definition, $entity_type_manager, $time);
|
Chris@14
|
31 @trigger_error(__NAMESPACE__ . '\SaveNode is deprecated in Drupal 8.5.x, will be removed before Drupal 9.0.0. Use \Drupal\Core\Action\Plugin\Action\SaveAction instead. See https://www.drupal.org/node/2919303.', E_USER_DEPRECATED);
|
Chris@0
|
32 }
|
Chris@0
|
33
|
Chris@0
|
34 }
|