You are here

public static function FeedImport::deleteFeed in Feed Import 7.3

Deletes a feed.

Parameters

object $feed: Feed info

bool $hashes: Also remove hashes

1 call to FeedImport::deleteFeed()
feed_import_delete_feed_form_submit in ./feed_import.module
Delete feed form submit

File

feed_import_base/inc/feed_import.inc, line 302
This file contains Feed Import helpers.

Class

FeedImport
This class provides helper functions for feed import.

Code

public static function deleteFeed($feed, $hashes = TRUE) {
  db_delete('feed_import_settings')
    ->condition('machine_name', $feed->machine_name)
    ->execute();
  if ($hashes && isset($feed->settings['hashes']['class'])) {
    $class = $feed->settings['hashes']['class'];
    $class::deleteByFeed($feed->machine_name);
  }
}