| Conditions | 3 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 72 | public function hasChildren($id_parent, $table = null) |
||
| 73 | { |
||
| 74 | $table = isset($table) ? $table : $this->table; |
||
| 75 | |||
| 76 | $result = $this->qb->select('id')->table($table)->getWhere([$this->parentKey => $id_parent]); |
||
| 77 | |||
| 78 | print_out($this->db->getLastQuery()); |
||
| 79 | |||
| 80 | if ($result->count() > 0) { |
||
| 81 | return true; |
||
| 82 | } |
||
| 83 | |||
| 84 | return false; |
||
| 85 | } |
||
| 86 | } |