You are here

public function ProfileFormController::activate in Profile 2 8

Form submission handler for the 'activate' 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 93
Contains \Drupal\profile\ProfileFormController.

Class

ProfileFormController
Form controller for profile forms.

Namespace

Drupal\profile

Code

public function activate(array $form, FormStateInterface $form_state) {
  $profile = $this->entity;
  $profile
    ->setActive(TRUE);
  return $profile;
}