| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 20 | public function createRow() |
||
| 21 | { |
||
| 22 | // Create row table material |
||
| 23 | $row = new Material(); |
||
| 24 | $row->parent_id = $this->id; |
||
| 25 | $row->Active = 1; |
||
| 26 | $row->save(); |
||
| 27 | |||
| 28 | // Create row material relation to specific table |
||
| 29 | $structureMaterial = new NavigationMaterial(); |
||
| 30 | $structureMaterial->MaterialID = $row->id; |
||
| 31 | $structureMaterial->StructureID = $this->structureID; |
||
| 32 | $structureMaterial->Active = 1; |
||
| 33 | $structureMaterial->save(); |
||
| 34 | |||
| 35 | return $row; |
||
| 36 | } |
||
| 37 | } |
||
| 38 |