nbUnreadsPerFeed.phtml 310 B

1234567891011121314
  1. <?php
  2. $result = array(
  3. 'feeds' => array(),
  4. 'tags' => array(),
  5. );
  6. foreach ($this->categories as $cat) {
  7. foreach ($cat->feeds() as $feed) {
  8. $result['feeds'][$feed->id()] = $feed->nbNotRead();
  9. }
  10. }
  11. foreach ($this->tags as $tag) {
  12. $result['tags'][$tag->id()] = $tag->nbUnread();
  13. }
  14. echo json_encode($result);