1 | <?php namespace NukaCode\Menu\Traits; |
||
8 | trait Insertable { |
||
9 | |||
10 | /** |
||
11 | * Let the add method know not to append this item as it was spliced into the array. |
||
12 | * |
||
13 | * @var bool |
||
14 | */ |
||
15 | public $insert = false; |
||
16 | |||
17 | /** |
||
18 | * Insert this item after another item in the menu |
||
19 | * |
||
20 | * @param $slug |
||
21 | */ |
||
22 | 2 | public function insertAfter($slug) |
|
26 | |||
27 | /** |
||
28 | * Insert this item before another item in the menu |
||
29 | * |
||
30 | * @param $slug |
||
31 | */ |
||
32 | 2 | public function insertBefore($slug) |
|
36 | |||
37 | /** |
||
38 | * @param $slug |
||
39 | * @param $after |
||
40 | */ |
||
41 | 4 | private function insertObject($slug, $after = false) |
|
68 | } |