Skip to content

Commit

Permalink
Improve the configuration method documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Jul 11, 2024
1 parent bd35954 commit d0c9c1c
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ class NavigationMenuConfigurationBuilder extends ArrayObject implements Arrayabl
/**
* Set the order of the navigation items.
*
* Either define a map of route keys to priorities, or just a list of route keys and we'll try to match that order.
*
* @param array<string, int>|array<string> $order
* @return $this
*/
Expand All @@ -33,6 +35,8 @@ public function order(array $order): static
/**
* Set the labels for the navigation items.
*
* Each key should be a route key, and the value should be the label to display.
*
* @param array<string, string> $labels
* @return $this
*/
Expand All @@ -46,6 +50,8 @@ public function labels(array $labels): static
/**
* Exclude certain items from the navigation.
*
* Each item should be a route key for the page to exclude.
*
* @param array<string> $exclude
* @return $this
*/
Expand All @@ -59,6 +65,8 @@ public function exclude(array $exclude): static
/**
* Add custom items to the navigation.
*
* @example `[Navigation::item('https://github.com/hydephp/hyde', 'GitHub', 200, ['target' => '_blank'])]`
*
* @param array<array{destination: string, label: ?string, priority: ?int, attributes: array<string, scalar>}> $custom
* @return $this
*/
Expand All @@ -72,6 +80,8 @@ public function custom(array $custom): static
/**
* Set the display mode for subdirectories.
*
* You can choose between 'dropdown', 'flat', and 'hidden'.
*
* @param 'dropdown'|'flat'|'hidden' $displayMode
* @return $this
*/
Expand Down

0 comments on commit d0c9c1c

Please sign in to comment.