You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/digging-deeper/navigation.md
+9-12Lines changed: 9 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -297,36 +297,33 @@ For example: `_docs/getting-started/installation.md` will be placed in a group c
297
297
298
298
## Digging Deeper into the internals
299
299
300
-
While not required to know, you may find it interesting to learn more about how the navigation is handled internally.
301
-
The best way to learn about this is to look at the source code, so here is a high-level overview with details on where to look in the source code.
300
+
While not required to know, you may find it interesting to learn more about how the navigation is handled internally. Here is a high level overview,
301
+
but you can find more detailed information in the [Navigation API](navigation-api) documentation.
302
302
303
-
The main navigation menu is the `MainNavigationMenu` class, and the documentation sidebar is the `DocumentationSidebar` class.
304
-
Both extend the same `BaseNavigationMenu` class:
303
+
The main navigation menu is the `MainNavigationMenu` class, and the documentation sidebar is the `DocumentationSidebar` class. Both extend the same base `NavigationMenu` class.
305
304
306
305
```php
307
-
// TODO: Update these examples
308
-
309
306
use Hyde\Framework\Features\Navigation\MainNavigationMenu;
310
307
use Hyde\Framework\Features\Navigation\DocumentationSidebar;
311
-
use Hyde\Framework\Features\Navigation\BaseNavigationMenu;
308
+
use Hyde\Framework\Features\Navigation\NavigationMenu;
312
309
```
313
310
314
-
Within the `BaseNavigationMenu` class, you will find the main logic for how the menus are generated,
311
+
Within the base `NavigationMenu` class, you will find the main logic for how the menus are generated,
315
312
while the child implementations contain the extra logic tailored for their specific use cases.
316
313
317
-
All the navigation menus store the menu items in their `$items` array containing instances of the `NavigationItem` class.
314
+
All the navigation menus store the menu items in their `$items` collection containing instances of the `NavigationItem` class.
318
315
319
316
The `NavigationItem` class is a simple class that contains the label and URL of the menu item and is used to represent each item in the menu.
320
-
Dropdowns are represented by `DropdownNavigationItem` instances, which extend the `NavigationItem` class and contain an array of additional `NavigationItem` instances.
317
+
Dropdowns are represented by `NavigationGroup` instances, which extend the `NavigationMenu` class and contain a collection of additional `NavigationItem` instances.
321
318
322
319
```php
323
320
use Hyde\Framework\Features\Navigation\NavigationItem;
324
-
use Hyde\Framework\Features\Navigation\DropdownNavigationItem;
321
+
use Hyde\Framework\Features\Navigation\NavigationGroup;
325
322
```
326
323
327
324
## The Navigation API
328
325
329
-
If you want to interact with the site navigation programmatically, or if you want to create complex custom, you can do so through the new Navigation API.
326
+
If you want to interact with the site navigation programmatically, or if you want to create complex custom menus, you can do so through the new Navigation API.
330
327
For most cases you don't need this, as Hyde creates the navigation for you. But it can be useful for advanced users and package developers.
331
328
332
329
The Navigation API consists of a set of PHP classes, allowing you to fluently interact with the navigation menus. You can learn more about the API in the [Navigation API](navigation-api) documentation.
0 commit comments