public function ProfileFormController::deactivate in Profile 2 8
Form submission handler for the 'deactivate' action.
Parameters
$form: An associative array containing the structure of the form.
$form_state: A reference to a keyed array containing the current state of the form.
File
- src/
ProfileFormController.php, line 107 - Contains \Drupal\profile\ProfileFormController.
Class
- ProfileFormController
- Form controller for profile forms.
Namespace
Drupal\profileCode
public function deactivate(array $form, FormStateInterface $form_state) {
$profile = $this->entity;
$profile
->setActive(FALSE);
return $profile;
}