public function UnstickyNode::execute

Executes the plugin.

Overrides ExecutableInterface::execute

File

drupal/core/modules/node/lib/Drupal/node/Plugin/Action/UnstickyNode.php, line 28
Contains \Drupal\node\Plugin\Action\UnstickyNode.

Class

UnstickyNode
Makes a node not sticky.

Namespace

Drupal\node\Plugin\Action

Code

public function execute($entity = NULL) {
  $entity->sticky = NODE_NOT_STICKY;
  $entity
    ->save();
}