/**
  * @todo Convert this to a twig template.
  */
 protected function getStatus(Feed $feed)
 {
     $progress_importing = $feed->progressImporting();
     $v = array();
     if ($progress_importing != StateInterface::BATCH_COMPLETE) {
         $v['#progress_importing'] = $progress_importing;
     }
     $progress_clearing = $feed->progressClearing();
     if ($progress_clearing != StateInterface::BATCH_COMPLETE) {
         $v['#progress_clearing'] = $progress_clearing;
     }
     $v['#imported'] = $feed->imported->value;
     $v['#count'] = $feed->getItemCount();
     $v['#theme'] = 'feeds_feed_status';
     if (!empty($v)) {
         return $v;
     }
 }
Exemple #2
0
 protected function reloadFeed($fid)
 {
     $this->container->get('entity.manager')->getStorage('feeds_feed')->resetCache();
     return Feed::load($fid);
 }