public function VotingApiReactionForm::getFormId in Voting API Reaction 8
Returns a unique string identifying the form.
The returned ID should be a unique string that can be a valid PHP function name, since it's used in hook implementation names such as hook_form_FORM_ID_alter().
Return value
string The unique string identifying the form.
Overrides EntityForm::getFormId
File
- src/
Form/ VotingApiReactionForm.php, line 79
Class
- VotingApiReactionForm
- Form implementation of the reaction form used in field formatter.
Namespace
Drupal\votingapi_reaction\FormCode
public function getFormId() {
/* @var \Drupal\votingapi\Entity\Vote $entity */
$entity = $this
->getEntity();
return implode('_', [
'votingapi_reaction',
$entity
->getVotedEntityType(),
$entity
->getVotedEntityId(),
$entity
->get('field_name')->value,
]);
}