<commit_before>Drop Downs
==========
A drop down is just a link that allows you to add sub links.

This Class also implements the linkable trait so it has access to all the link and drop down add methods in the menu class.

.. note:: See link documentation for methods and properties.

Check if the drop down has links
--------------------------------
You can call the ``hasLinks()`` method on the drop down class to see if there are any links
This is to allow you to run a foreach if there are links present. Otherwise treat it as a normal link.<commit_msg>updated dropdown docs<commit_after>Drop Downs
==========
A drop down is just a link that allows you to add sub links.

This Class also implements the linkable trait so it has access to all the link and drop down add methods in the menu class.

.. note:: See link documentation for methods and properties when adding links.


Parameters:
Slug: The slug used to find this drop down again when trying to edit it, when setting the drop down as active or when
inserting before or after another menu item.

Link Name: The name of the drop down.

.. code::

    $menu->dropDown('slug', 'drop down name', function (DropDown $dropDown) {
        $dropDown->link('slug', function (Link $link) {
            $link->name = 'Take me to google';
            $link->url = 'http://google.com';
            $link->options = ['class' => 'btn'];
        });

        $dropDown->link('slug2', function (Link $link) {
            $link->name = 'Take me to git hub';
            $link->url = 'http://github.com';
            $link->options = ['class' => 'btn btn-primary'];
        });
    });

Get drop down
-------------
You can use the get dropdown method to pull back the drop down object and change it.

.. code::

    $menu->getDropDown('slug', function (DropDown $dropDown) {
        $dropDown->name = 'Change the dropdown name';
    });


Check if the drop down has links
--------------------------------
You can call the ``hasLinks()`` method on the drop down class to see if there are any links
This is to allow you to run a foreach if there are links present. Otherwise treat it as a normal link.


Insert After/Before
-------------------
You can tell a link to be inserted before or after another link or dropdown.

Parameters:
slug: The slug of the link or drop down to insert before or after.

.. code::

    $dropDown->insertAfter('slug');
    $dropDown->insertBefore('slug');
{'fraction_non_alphanumeric': 0.13226205191594562, 'fraction_numerical': 0.00041203131437989287, 'mean_word_length': 2.6676737160120845, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7426757', 'n_tokens_mistral': 631, 'n_tokens_neox': 621, 'n_words': 335}