| Total Complexity | 3 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class RestfulServerTestAuthorRating extends DataObject implements TestOnly |
||
| 9 | { |
||
| 10 | private static $api_access = array( |
||
|
|
|||
| 11 | 'view' => array( |
||
| 12 | 'Rating', |
||
| 13 | 'WriteProtectedField', |
||
| 14 | 'Author' |
||
| 15 | ), |
||
| 16 | 'edit' => array( |
||
| 17 | 'Rating' |
||
| 18 | ) |
||
| 19 | ); |
||
| 20 | |||
| 21 | private static $table_name = 'RestfulServerTestAuthorRating'; |
||
| 22 | |||
| 23 | private static $db = array( |
||
| 24 | 'Rating' => 'Int', |
||
| 25 | 'SecretField' => 'Text', |
||
| 26 | 'WriteProtectedField' => 'Text', |
||
| 27 | ); |
||
| 28 | |||
| 29 | private static $has_one = array( |
||
| 30 | 'Author' => RestfulServerTestAuthor::class, |
||
| 31 | 'SecretRelation' => RestfulServerTestAuthor::class, |
||
| 32 | ); |
||
| 33 | |||
| 34 | public function canView($member = null) |
||
| 35 | { |
||
| 36 | return true; |
||
| 37 | } |
||
| 38 | |||
| 39 | public function canEdit($member = null) |
||
| 42 | } |
||
| 43 | |||
| 44 | public function canCreate($member = null, $context = array()) |
||
| 49 |