1: <?php
2:
3: namespace Charcoal\Cms\Support\Interfaces;
4:
5: use Charcoal\Cms\NewsInterface;
6: use Charcoal\Object\CategoryInterface;
7:
8: interface NewsManagerAwareInterface
9: {
10: /**
11: * Formatted news list
12: * Returns the entries for the current page.
13: * @return \Generator|void
14: */
15: public function newsList();
16:
17: /**
18: * Formatted news archive list
19: * Returns the entries for the current page.
20: * @return \Generator|void
21: */
22: public function newsArchiveList();
23:
24: /**
25: * Current news.
26: * @return array The properties of the current news
27: */
28: public function currentNews();
29:
30: /**
31: * @return \Generator
32: */
33: public function featNews();
34:
35: /**
36: * Next news in list.
37: * @return array The next news properties.
38: */
39: public function nextNews();
40:
41: /**
42: * Next news in list.
43: * @return array The next news properties.
44: */
45: public function prevNews();
46:
47: /**
48: * Amount of news (total)
49: * @return integer How many news?
50: */
51: public function numNews();
52:
53: /**
54: * @return float
55: */
56: public function numNewsPages();
57:
58: /**
59: * @return boolean
60: */
61: public function newsHasPager();
62:
63: /**
64: * @return \Generator
65: */
66: public function newsCategoryList();
67:
68: /**
69: * @param NewsInterface $news Charcoal\Cms\NewsInterface;.
70: * @return CategoryInterface
71: */
72: public function newsCategory(NewsInterface $news);
73: }
74: