silverstripe-framework/tests/php/Control/RSS/RSSFeedTest/ItemA.php

37 lines
709 B
PHP
Raw Normal View History

2016-11-13 08:35:43 +01:00
<?php
namespace SilverStripe\Control\Tests\RSS\RSSFeedTest;
use SilverStripe\Control\Controller;
use SilverStripe\View\ViewableData;
class ItemA extends ViewableData
{
// RSS-feed items must have $casting/$db information.
private static $casting = array(
'Title' => 'Varchar',
'Content' => 'Text',
'AltContent' => 'Text',
);
2016-11-13 08:35:43 +01:00
public function getTitle()
{
return "ItemA";
}
2016-11-13 08:35:43 +01:00
public function getContent()
{
return "ItemA Content";
}
2016-11-13 08:35:43 +01:00
public function getAltContent()
{
return "ItemA AltContent";
}
2016-11-13 08:35:43 +01:00
public function Link($action = null)
{
return Controller::join_links("item-a/", $action);
}
2016-11-13 08:35:43 +01:00
}