You are here

public function Image::deleteFormSubmit in SimpleAds 8

Delete an ad.

Overrides SimpleAdsTypeBase::deleteFormSubmit

File

src/Plugin/SimpleAds/Type/Image.php, line 66

Class

Image
Image Ad type.

Namespace

Drupal\simpleads\Plugin\SimpleAds\Type

Code

public function deleteFormSubmit($options, FormStateInterface $form_state, $type = NULL, $id = NULL) {
  if (!empty($options['fid'])) {
    $this
      ->deleteImage($options['fid']);
  }
  return $options;
}