silverstripe-googlesitemaps/tests/Model/TestDataObject.php

37 lines
638 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;
class TestDataObject extends DataObject implements TestOnly
{
2023-10-27 22:23:54 +02:00
protected $private = false;
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)
{
2023-10-27 22:23:54 +02:00
if ($this->private) {
return false;
}
return true;
}
2023-10-27 22:23:54 +02:00
public function setPrivate()
{
$this->private = true;
}
public function AbsoluteLink()
{
return Director::absoluteBaseURL();
}
}