| Total Complexity | 1 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 8 | class RestfulServerTestAuthor extends DataObject implements TestOnly |
||
| 9 | { |
||
| 10 | private static $api_access = true; |
||
|
|
|||
| 11 | |||
| 12 | private static $table_name = 'RestfulServerTestAuthor'; |
||
| 13 | |||
| 14 | private static $db = array( |
||
| 15 | 'FirstName' => 'Text', |
||
| 16 | ); |
||
| 17 | |||
| 18 | private static $many_many = array( |
||
| 19 | 'RelatedPages' => RestfulServerTestPage::class, |
||
| 20 | 'RelatedAuthors' => RestfulServerTestAuthor::class, |
||
| 21 | 'SortedPages' => [ |
||
| 22 | 'through' => AuthorSortedPageRelation::class, |
||
| 23 | 'from' => 'Parent', |
||
| 24 | 'to' => 'SortedPage', |
||
| 25 | ], |
||
| 26 | ); |
||
| 27 | |||
| 28 | private static $has_many = array( |
||
| 29 | 'PublishedPages' => RestfulServerTestPage::class, |
||
| 30 | 'Ratings' => RestfulServerTestAuthorRating::class, |
||
| 31 | 'SortedPagesRelation' => AuthorSortedPageRelation::class . '.Parent', |
||
| 32 | ); |
||
| 33 | |||
| 34 | public function canView($member = null) |
||
| 39 |