You are here

public function NodeMakePostPublic::execute in Private 8

Executes the plugin.

Overrides ExecutableInterface::execute

File

src/Plugin/Action/NodeMakePostPublic.php, line 22

Class

NodeMakePostPublic
Make a post public.

Namespace

Drupal\private_content\Plugin\Action

Code

public function execute($entity = NULL) {
  $entity->private->value = 0;
  $entity
    ->save();
}