You are here

public function PublishProfile::execute in Profile 2 8

Executes the plugin.

Overrides ExecutableInterface::execute

File

src/Plugin/Action/PublishProfile.php, line 27
Contains \Drupal\profile\Plugin\Action\PublishProfile.

Class

PublishProfile
Publishes a profile.

Namespace

Drupal\profile\Plugin\Action

Code

public function execute($entity = NULL) {
  $entity->status = PROFILE_ACTIVE;
  $entity
    ->save();
}