CMS  Version 3.9
rss_feed_articles.inc
Go to the documentation of this file.
1 <?php
7 class RSSFeedArticles extends DataItem
8 {
9  var $table = "rss_feed_articles";
10  var $primary_key = "rss_article_id";
11 
12  var $fields = array(
13  "rss_article_id" => Number,
14  "rss_title" => Text,
15  "rss_feed_id" => Number,
16  "rss_article_author" => String,
17  "rss_article_newsStory" => Text,
18  "rss_article_content" => Text,
19  "rss_article_URL" => String,
20  "rss_thumbnail" => String,
21  "article_date" => DateTime,
22  "publish_status" => Boolean,
23  "date_added" => Timestamp
24  );
25 
26  var $relations = array("RSSFeed" => RSSFeed);
27 
28  function RSSFeed()
29  {
30  return $this->getRelated(RSSFeed);
31  }
32 
33  static function getPublishedArticles($limit = 10)
34  {
35  return Query::create(RSSFeedArticles, "WHERE publish_status=1 ORDER BY article_date DESC LIMIT $limit")->execute();
36  }
37 }?>
static getPublishedArticles($limit=10)