public function getNavigation()
    {
        $locations = get_nav_menu_locations();

        if (isset($locations[$this->getSlug()])) {
            $location = $locations[$this->getSlug()];

            $navigation = wp_get_nav_menus(['include' => $location]);

            return reset($navigation);
        }
    }
public function getNavigation()
    {
        $locations = get_nav_menu_locations();

        if (isset($locations[$this->getSlug()])) {
            $location = $locations[$this->getSlug()];

            $navigation = wp_get_nav_menus(['include' => $location]);

            return reset($navigation);
        }
    }
public function getNavigation ( ) { $ locations = get_nav_menu_locations ( ) ; if ( isset ( $ locations [ $ this -> getSlug ( ) ] ) ) { $ location = $ locations [ $ this -> getSlug ( ) ] ; $ navigation = wp_get_nav_menus ( [ 'include' => $ location ] ) ; return reset ( $ navigation ) ; } }
Get navigation assigned to the menu.

@return \WP_Term
Get navigation assigned to the menu .