library/Helper/NavigationTree.php
protected function getSecondLevelPages()
    {
        $secondLevel = array();

        foreach ($this->topLevelPages as $topLevelPage) {
            $pages = get_posts(array(
                'post_parent' => $topLevelPage->ID,
                'post_type' => 'page',
                'orderby' => 'menu_order post_title',
                'order' => 'asc',
                'posts_per_page' => -1
            ));

            $secondLevel[$topLevelPage->ID] = $pages;
        }

        $this->secondLevelPages = $secondLevel;
        return $secondLevel;
    }
protected function getSecondLevelPages()
    {
        $secondLevel = array();

        foreach ($this->topLevelPages as $topLevelPage) {
            $pages = get_posts(array(
                'post_parent' => $topLevelPage->ID,
                'post_type' => 'page',
                'orderby' => 'menu_order post_title',
                'order' => 'asc',
                'posts_per_page' => -1
            ));

            $secondLevel[$topLevelPage->ID] = $pages;
        }

        $this->secondLevelPages = $secondLevel;
        return $secondLevel;
    }
protected function getSecondLevelPages ( ) { $ secondLevel = array ( ) ; foreach ( $ this -> topLevelPages as $ topLevelPage ) { $ pages = get_posts ( array ( 'post_parent' => $ topLevelPage -> ID , 'post_type' => 'page' , 'orderby' => 'menu_order post_title' , 'order' => 'asc' , 'posts_per_page' => - 1 ) ) ; $ secondLevel [ $ topLevelPage -> ID ] = $ pages ; } $ this -> secondLevelPages = $ secondLevel ; return $ secondLevel ; }
Gets second level pages
@return array
Gets second level pages