public function setPreviousItem(ProxySourceItem $item = null)
{
$lastPreviousItem = $this->previousItem;
$this->previousItem = $item;
if ($lastPreviousItem) {
// We did have a item before...
if (!$item || $item->id() !== $lastPreviousItem->id()) {
// But we no longer have a item or the item we
// were given does not have the same ID as the
// last one we had...
$this->reprocess();
}
} elseif ($item) {
// We didn't have a item before but we do now...
$this->reprocess();
}
}