Source of file RestfulServerTestAuthor.php
Size: 1,011 Bytes - Last Modified: 2021-12-23T10:34:00+00:00
/var/www/docs.ssmods.com/process/src/tests/unit/Stubs/RestfulServerTestAuthor.php
123456789101112131415161718192021222324252627282930313233343536373839 | <?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; private static $table_name = 'RestfulServerTestAuthor'; private static $db = array( 'FirstName' => 'Text', ); private static $many_many = array( 'RelatedPages' => RestfulServerTestPage::class, 'RelatedAuthors' => RestfulServerTestAuthor::class, 'SortedPages' => [ 'through' => AuthorSortedPageRelation::class, 'from' => 'Parent', 'to' => 'SortedPage', ], ); private static $has_many = array( 'PublishedPages' => RestfulServerTestPage::class, 'Ratings' => RestfulServerTestAuthorRating::class, 'SortedPagesRelation' => AuthorSortedPageRelation::class . '.Parent', ); public function canView($member = null) { return true; } } |