src/Pages/HailPage.php
public function getCurrentArticle()
    {
        if ($this->current_article instanceof Article || $this->current_article === null) {
            return $this->current_article;
        }

        $params = Controller::curr()->getRequest()->params();
        if(empty($params['ID'])){
            $this->current_article = null;
        } else {
            $this->current_article = Article::get()->filter(['HailID' => $params['ID']])->first();
        }

        return $this->current_article;
    }
public function getCurrentArticle()
    {
        if ($this->current_article instanceof Article || $this->current_article === null) {
            return $this->current_article;
        }

        $params = Controller::curr()->getRequest()->params();
        if(empty($params['ID'])){
            $this->current_article = null;
        } else {
            $this->current_article = Article::get()->filter(['HailID' => $params['ID']])->first();
        }

        return $this->current_article;
    }
public function getCurrentArticle ( ) { if ( $ this -> current_article instanceof Article || $ this -> current_article === null ) { return $ this -> current_article ; } $ params = Controller :: curr ( ) -> getRequest ( ) -> params ( ) ; if ( empty ( $ params [ 'ID' ] ) ) { $ this -> current_article = null ; } else { $ this -> current_article = Article :: get ( ) -> filter ( [ 'HailID' => $ params [ 'ID' ] ] ) -> first ( ) ; } return $ this -> current_article ; }
Get article accessed in current request

@return Article|null
Get article accessed in current request