ENHANCEMENT Addition of Date, so date can be used in the RSS feed

ENHANCEMENT Allow casting of Date and Title so can be modified in template
This commit is contained in:
Sean Harvey 2008-12-10 00:58:17 +00:00
parent 01b48e74b7
commit dcb23d6cc3
1 changed files with 12 additions and 2 deletions

View File

@ -51,9 +51,19 @@ class RSSWidget extends Widget {
$this->feed->init();
if($items = $this->feed->get_items(0, $this->NumberToShow)) {
foreach($items as $item) {
// Cast the Date
$date = new Date('Date');
$date->setValue($item->get_date());
// Cast the Title
$title = new Text('Title');
$title->setValue($item->get_title());
$output->push(new ArrayData(array(
"Title" => $item->get_title(),
"Link" => $item->get_link()
'Title' => $title,
'Date' => $date,
'Link' => $item->get_link()
)));
}
return $output;