Conditions | 4 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | public function columnIntervention() |
||
20 | { |
||
21 | if(request("sub_module") && Cache::has("subModule".request("sub_module")) && cb()->getCurrentMethod() != "getDetail") { |
||
|
|||
22 | /* |
||
23 | * If there is sub module, the column that has same name with foreign key should be remove |
||
24 | * And change to hidden. So we can save the foreign Key id from the parent module. |
||
25 | */ |
||
26 | $subModule = Cache::get("subModule".request("sub_module")); |
||
27 | $this->removeColumn($subModule["foreignKey"]) |
||
28 | ->addHidden($subModule["foreignKey"],$subModule['foreignKey']) |
||
29 | ->defaultValue($subModule['foreignValue']); |
||
30 | } |
||
33 | } |