silverstripe-googlesitemaps/tests/Model/UnviewableDataObject.php

26 lines
468 B
PHP
Raw Permalink Normal View History

<?php
2017-10-20 00:16:53 +02:00
namespace Wilr\GoogleSitemaps\Tests\Model;
2016-11-02 12:39:25 +01:00
use SilverStripe\ORM\DataObject;
2017-10-20 00:16:53 +02:00
use SilverStripe\Dev\TestOnly;
use SilverStripe\Control\Director;
2017-10-20 00:16:53 +02:00
class UnviewableDataObject extends DataObject implements TestOnly
{
2017-10-20 00:16:53 +02:00
private static $db = array(
'Priority' => 'Varchar(10)'
2017-10-20 00:16:53 +02:00
);
public function canView($member = null)
{
2017-10-20 00:16:53 +02:00
return false;
}
public function AbsoluteLink()
{
return Director::absoluteBaseURL();
}
}