Change record status: 
Project: 
Introduced in branch: 
8.x
Description: 

Feeds

Aggregator feeds and feed items are now Content Entities.

Whenever a feed/feed item id needs to be retrieved use $feed->id() and $feed->label() for title.

D7

<?php
// Feeds.
$feeds = db_query('SELECT * FROM {aggregator_feed}');
foreach (
$feeds as $feed) {
 
$options[$feed->fid] = $feed->title;
}
// Feed items.
$items = db_query('SELECT * FROM {aggregator_item}');
foreach (
$items as $item) {
 
$options[$item->iid] = $item->title;
}
?>

D8

<?php
// Feeds.
use Drupal\aggregator\Entity\Feed;
$feeds = Feed::loadMultiple();
foreach (
$feeds as $feed) {
 
$options[$feed->id()] = $feed->label();
}
// Feed items.
use Drupal\aggregator\Entity\Item;
$feeds = Item::loadMultiple();
foreach (
$items as $item) {
 
$options[$item->id()] = $item->label();
}
?>

- aggregator_save_feed() and aggregator_save_item() have been removed in favor of save() method

D7

<?php
// Feeds.
$feed = array(
 
'title' => $title,
 
'url' => $feed_url,
 
'refresh' => '900',
 
'block' => 5,
);
aggregator_save_feed($feed);

// Feed items.
$item = array(
 
'fid' => $fid,
 
'timestamp' => $timestamp,
 
'title' => $title,
 
'link' => $link,
 
'author' => $author,
 
'description' => $description,
 
'guid' => $guid,
);
aggregator_save_item($item);
?>

D8

<?php
// Feeds.
$feed = Feed::create(array(
 
'title' => $title,
 
'url' => $feed_url,
 
'refresh' => 900,
 
'block' => 5,
));
$feed->save();

// Feed items.
$item = Item::create(array(
 
'fid' => $fid,
 
'timestamp' => $timestamp,
 
'title' => $title,
 
'link' => $link,
 
'author' => $author,
 
'description' => $description,
 
'guid' => $guid,
));
$item->save();
?>

- aggregator_feed_source theming function renamed to aggregator_feed
D7

<?php
function THEME_preprocess_aggregator_feed_source(&$variables) {
 
$feed = $variables['aggregator_feed'];
 
// Do stuff
}
?>

D8

<?php
function THEME_preprocess_aggregator_feed(&$variables) {
 
// Notice the extra 'elements' key.
 
$feed = $variables['elements']['#aggregator_feed'];
 
// Do stuff
}
?>

- aggregator_summary_item and aggregator_summary_items has been removed. aggregator_item can now be used, with a check for the view mode:
D7

<?php
function THEME_preprocess_aggregator_summary_item(&$variables) {
 
$item = $variables['aggregator_item'];
 
// Do stuff
}
function
THEME_preprocess_aggregator_summary_items(&$variables) {
 
$item = $variables['aggregator_item'];
 
// Do stuff
}
?>

D8

<?php
function THEME_preprocess_aggregator_item(&$variables) {
 
// Notice the extra 'elements' key.
 
$item = $variables['elements']['#aggregator_item'];
  if (
$variables['elements']['#view_mode'] == 'summary') {
   
// Do stuff
 
}
}
?>
Impacts: 
Module developers
Themers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done