/**
  * {@inheritdoc}
  */
 public function submitForm(array &$form, FormStateInterface $form_state)
 {
     $grouping = \Drupal::request()->get('grouping');
     // Delete the entry.
     EAGroupingsStorage::delete(array('gid' => $grouping->gid));
     // Set logo image file for removal.
     if ($grouping->logo_fid) {
         $file = file_load($grouping->logo_fid);
         if ($file) {
             \Drupal::service('file.usage')->delete($file, 'ea_groupings', 'group', $grouping->gid);
         }
     }
     // Set a message that the entity was deleted.
     drupal_set_message(t('Deleted @title', array('@title' => $grouping->title)));
     // Redirect the user to the list controller when complete.
     $form_state->setRedirectUrl($this->getCancelUrl());
 }