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