mirror of
https://github.com/wilr/silverstripe-googlesitemaps.git
synced 2024-10-22 11:05:48 +02:00
37 lines
638 B
PHP
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();
|
|
}
|
|
}
|