Executes the plugin.
Overrides ExecutableInterface::execute
File
- drupal/core/modules/node/lib/Drupal/node/Plugin/Action/DemoteNode.php, line 28
- Contains \Drupal\node\Plugin\Action\DemoteNode.
Class
- DemoteNode
- Demotes a node.
Namespace
Drupal\node\Plugin\Action
Code
public function execute($entity = NULL) {
$entity->promote = NODE_NOT_PROMOTED;
$entity
->save();
}