silverstripe-googlesitemaps/tests/Model/TestDataObject.php
2023-10-29 13:30:08 +13:00

37 lines
638 B
PHP

<?php
namespace Wilr\GoogleSitemaps\Tests\Model;
use SilverStripe\ORM\DataObject;
use SilverStripe\Dev\TestOnly;
use SilverStripe\Control\Director;
class TestDataObject extends DataObject implements TestOnly
{
protected $private = false;
private static $db = array(
'Priority' => 'Varchar(10)'
);
public function canView($member = null)
{
if ($this->private) {
return false;
}
return true;
}
public function setPrivate()
{
$this->private = true;
}
public function AbsoluteLink()
{
return Director::absoluteBaseURL();
}
}