You are here

public function RateWidgetForm::templateSelectorNextSubmit in Rate 8.2

Provides custom submission handler for the template selector.

Parameters

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

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

File

src/RateWidgetForm.php, line 613

Class

RateWidgetForm
Form controller for vote type forms.

Namespace

Drupal\rate

Code

public function templateSelectorNextSubmit(array &$form, FormStateInterface $form_state) {
  $form_state
    ->set('page', 'rate_widget_form');
  if (!$this->entity
    ->isNew()) {
    $this
      ->setOperation('edit');
  }
  else {
    $this
      ->setOperation('add');
  }
  $form_state
    ->setRebuild(TRUE);
}