You are here

function hook_forward_entity in Forward 4.0.x

Same name and namespace in other branches
  1. 8.2 forward.api.php \hook_forward_entity()
  2. 4.x forward.api.php \hook_forward_entity()

Post process the forward.

Parameters

\Drupal\user\UserInterface $account: The user account of the person who forwarded.

\Drupal\Core\Entity\EntityInterface $entity: The entity that was forwarded.

\Drupal\Core\Form\FormStateInterface $form_state: A form_state being processed.

1 function implements hook_forward_entity()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

forward_test_forward_entity in tests/modules/forward_test/forward_test.module
Implements hook_forward_entity().
1 invocation of hook_forward_entity()
ForwardForm::submitForm in src/Form/ForwardForm.php
Form submission handler.

File

./forward.api.php, line 70
Hooks provided by the Forward module.

Code

function hook_forward_entity(UserInterface $account, EntityInterface $entity, FormStateInterface $form_state) {

  // Example: redirect to the home page.
  $form_state
    ->setRedirect('<front>');
}