| 1 | <?php namespace Arcanesoft\Sidebar; |
||
| 11 | class SidebarCollection extends Collection |
||
| 12 | { |
||
| 13 | /* ----------------------------------------------------------------- |
||
| 14 | | Main Methods |
||
| 15 | | ----------------------------------------------------------------- |
||
| 16 | */ |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Push multiple sidebar items into the collection. |
||
| 20 | * |
||
| 21 | * @param array $items |
||
| 22 | * |
||
| 23 | * @return $this |
||
| 24 | */ |
||
| 25 | 16 | public function pushSidebarItems(array $items) |
|
| 33 | |||
| 34 | /** |
||
| 35 | * Push a new sidebar item to the collection. |
||
| 36 | * |
||
| 37 | * @param array $attributes |
||
| 38 | * |
||
| 39 | * @return $this |
||
| 40 | */ |
||
| 41 | 16 | public function pushSidebarItem(array $attributes) |
|
| 45 | |||
| 46 | /** |
||
| 47 | * Set the selected item. |
||
| 48 | * |
||
| 49 | * @param string $name |
||
| 50 | * |
||
| 51 | * @return $this |
||
| 52 | */ |
||
| 53 | 4 | public function setSelected(string $name) |
|
| 59 | |||
| 60 | /** |
||
| 61 | * Check if there is any item selected. |
||
| 62 | * |
||
| 63 | * @return bool |
||
| 64 | */ |
||
| 65 | 12 | public function hasAnySelected() : bool |
|
| 71 | } |
||
| 72 |