public function getCurrentPage()
    {
        $currentPage = Director::get_current_page();
        if ($currentPage instanceof ContentController) {
            $currentPage = $currentPage->data();
        }
        return $currentPage;
    }
public function getCurrentPage()
    {
        $currentPage = Director::get_current_page();
        if ($currentPage instanceof ContentController) {
            $currentPage = $currentPage->data();
        }
        return $currentPage;
    }
public function getCurrentPage ( ) { $ currentPage = Director :: get_current_page ( ) ; if ( $ currentPage instanceof ContentController ) { $ currentPage = $ currentPage -> data ( ) ; } return $ currentPage ; }
Returns the current page scope
@return Controller
Returns the current page scope