You are here

function brightcove_playlist_delete_form_submit in Brightcove Video Connect 7.7

Same name and namespace in other branches
  1. 7.3 brightcove.module \brightcove_playlist_delete_form_submit()
  2. 7.4 brightcove.module \brightcove_playlist_delete_form_submit()
  3. 7.5 brightcove.module \brightcove_playlist_delete_form_submit()
  4. 7.6 brightcove.playlist.inc \brightcove_playlist_delete_form_submit()

Playlist delete confirm form submit handler.

File

./brightcove.playlist.inc, line 587
Brightcove playlist related functions.

Code

function brightcove_playlist_delete_form_submit($form, &$form_state) {
  $entity_info = entity_get_info('brightcove_playlist');
  entity_get_controller('brightcove_playlist')
    ->delete([
    $form['#entity']->{$entity_info['entity keys']['id']},
  ]);

  // Redirect the user the playlists listing page.
  $form_state['redirect'] = [
    'admin/config/media/brightcove/playlist',
  ];
}