You are here

function photos_form_redirect in Album Photos 8.4

Same name and namespace in other branches
  1. 8.5 photos.module \photos_form_redirect()
  2. 7.3 photos.module \photos_form_redirect()
  3. 6.0.x photos.module \photos_form_redirect()

Redirect photos form to image management page.

1 string reference to 'photos_form_redirect'
photos_form_alter in ./photos.module
Implements hook_form_alter().

File

./photos.module, line 1122
Implementation of photos.module.

Code

function photos_form_redirect($form, FormStateInterface &$form_state) {
  $nid = $form_state
    ->getValue('nid');
  $url = Url::fromUri('base:node/' . $nid . '/photos');
  $form_state
    ->setRedirectUrl($url);
}