Total Complexity | 4 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | class TestRelationObject extends DataObject implements TestOnly |
||
10 | { |
||
11 | private static $db = [ |
||
12 | 'Title' => 'Varchar(255)', |
||
13 | ]; |
||
14 | |||
15 | private static $has_one = [ |
||
16 | 'TestObject' => TestObject::class, |
||
17 | ]; |
||
18 | |||
19 | public function canView($member = null) |
||
20 | { |
||
21 | return true; |
||
22 | } |
||
23 | |||
24 | public function getCow() |
||
25 | { |
||
26 | return $this->getFarmAnimals()[0]; |
||
27 | } |
||
28 | |||
29 | public function getFarmAnimals() |
||
32 | } |
||
33 | |||
34 | public function getSheep() |
||
39 |