public function PromoteNode::execute in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/node/src/Plugin/Action/PromoteNode.php \Drupal\node\Plugin\Action\PromoteNode::execute()
 
Executes the plugin.
Overrides ExecutableInterface::execute
File
- core/
modules/ node/ src/ Plugin/ Action/ PromoteNode.php, line 27  - Contains \Drupal\node\Plugin\Action\PromoteNode.
 
Class
- PromoteNode
 - Promotes a node.
 
Namespace
Drupal\node\Plugin\ActionCode
public function execute($entity = NULL) {
  $entity
    ->setPromoted(TRUE);
  $entity
    ->save();
}