protected function BaseRatingForm::getResultFunction in Votingapi Widgets 8
Get result function.
2 calls to BaseRatingForm::getResultFunction()
- BaseRatingForm::ajaxSubmit in src/
Form/ BaseRatingForm.php - Ajax submit handler.
- BaseRatingForm::buildForm in src/
Form/ BaseRatingForm.php - Form constructor.
File
- src/
Form/ BaseRatingForm.php, line 141
Class
- BaseRatingForm
- Form controller for Campaign edit forms.
Namespace
Drupal\votingapi_widgets\FormCode
protected function getResultFunction(FormStateInterface $form_state) {
$entity = $this
->getEntity();
return $form_state
->get('resultfunction') ? $form_state
->get('resultfunction') : 'vote_field_average:' . $entity
->getVotedEntityType() . '.' . $entity->field_name->value;
}