Total Complexity | 6 |
Total Lines | 62 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | trait AdjacencyTrait |
||
24 | { |
||
25 | /** |
||
26 | * Parent Key Field |
||
27 | * |
||
28 | * @access public |
||
29 | * @type string |
||
30 | */ |
||
31 | public $parentKey = 'id_parent'; |
||
32 | |||
33 | /** |
||
34 | * Adjacency Enabled Flag |
||
35 | * |
||
36 | * @access protected |
||
37 | * @type bool |
||
38 | */ |
||
39 | protected $isUseAdjacency = true; |
||
40 | |||
41 | /** |
||
42 | * Get Children |
||
43 | * |
||
44 | * @param int $id_parent |
||
45 | * @param string|null $table |
||
46 | * |
||
47 | * @access public |
||
48 | * @return mixed |
||
49 | */ |
||
50 | public function getChildren($id_parent, $table = null) |
||
61 | } |
||
62 | |||
63 | /** |
||
64 | * Has Children |
||
65 | * |
||
66 | * @param int $id_parent |
||
67 | * @param string|null $table |
||
68 | * |
||
69 | * @access public |
||
70 | * @return bool |
||
71 | */ |
||
72 | public function hasChildren($id_parent, $table = null) |
||
85 | } |
||
86 | } |