public function UnpublishProfile::execute in Profile 2 8
Executes the plugin.
Overrides ExecutableInterface::execute
File
- src/
Plugin/ Action/ UnpublishProfile.php, line 27 - Contains \Drupal\profile\Plugin\Action\UnpublishProfile.
Class
- UnpublishProfile
- Unpublishes a profile.
Namespace
Drupal\profile\Plugin\ActionCode
public function execute($entity = NULL) {
$entity->status = PROFILE_NOT_ACTIVE;
$entity
->save();
}