Total Complexity | 4 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
5 | class SingleType extends RelationalType |
||
6 | { |
||
7 | protected $dataType = 'integer'; |
||
8 | protected $hasSingleRelation = true; |
||
9 | protected $size = false; |
||
10 | protected $relationalType = false; |
||
11 | protected $formType = 'parent'; |
||
12 | |||
13 | protected $stubs = [ |
||
14 | 'modelMethod' => 'common/Models/fragments/hasOne', |
||
15 | 'foreignMethod' => 'common/Models/fragments/belongsTo' |
||
16 | ]; |
||
17 | |||
18 | |||
19 | public function getValidationRule() { |
||
20 | return 'exists:'.$this->getRelatedModule().',id'; |
||
21 | } |
||
22 | |||
23 | public function hasSelfParent(){ |
||
25 | } |
||
26 | |||
27 | public function getColumnKey() |
||
30 | } |
||
31 | |||
33 |