for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace SilverStripe\RestfulServer\Tests\Stubs;
use SilverStripe\Dev\TestOnly;
use SilverStripe\ORM\DataObject;
class RestfulServerTestAuthor extends DataObject implements TestOnly
{
private static $api_access = true;
$api_access
private static $table_name = 'RestfulServerTestAuthor';
$table_name
private static $db = array(
$db
'FirstName' => 'Text',
);
private static $many_many = array(
$many_many
'RelatedPages' => RestfulServerTestPage::class,
'RelatedAuthors' => RestfulServerTestAuthor::class,
'SortedPages' => [
'through' => AuthorSortedPageRelation::class,
'from' => 'Parent',
'to' => 'SortedPage',
],
private static $has_many = array(
$has_many
'PublishedPages' => RestfulServerTestPage::class,
'Ratings' => RestfulServerTestAuthorRating::class,
'SortedPagesRelation' => AuthorSortedPageRelation::class . '.Parent',
public function canView($member = null)
return true;
}