silverstripe-framework/tests/php/Control/RSS/RSSFeedTest/ItemA.php
2016-12-19 16:08:19 +13:00

37 lines
709 B
PHP

<?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',
);
public function getTitle()
{
return "ItemA";
}
public function getContent()
{
return "ItemA Content";
}
public function getAltContent()
{
return "ItemA AltContent";
}
public function Link($action = null)
{
return Controller::join_links("item-a/", $action);
}
}