You are here

public function ShurlyDeactivateForm::submitForm in ShURLy 8

Form submission handler.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Overrides FormInterface::submitForm

File

src/Form/ShurlyDeactivateForm.php, line 91

Class

ShurlyDeactivateForm
ShurlyDeactivateForm.

Namespace

Drupal\shurly\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->messenger()
    ->addStatus($this
    ->t('Short URL has been deactivated'));
  shurly_set_link_active($this->rid, 0);
}