public function FeedsHTTPFetcher::sourceSave in Feeds 8.2
Override sourceSave() - subscribe to hub.
Overrides FeedsPlugin::sourceSave
File
- lib/
Drupal/ feeds/ Plugin/ feeds/ fetcher/ FeedsHTTPFetcher.php, line 172 - Contains \Drupal\feeds\Plugin\feeds\fetcher\FeedsHTTPFetcher.
Class
- FeedsHTTPFetcher
- Defines an HTTP fetcher.
Namespace
Drupal\feeds\Plugin\feeds\fetcherCode
public function sourceSave(FeedsSource $source) {
if ($this->config['use_pubsubhubbub']) {
// If this is a feeds node we want to delay the subscription to
// feeds_exit() to avoid transaction race conditions.
if ($source->feed_nid) {
$job = array(
'fetcher' => $this,
'source' => $source,
);
feeds_set_subscription_job($job);
}
else {
$this
->subscribe($source);
}
}
}