private function setNews()
    {
        $Params = $this->getURLParams();
        /** @var array $segmentFilter Array containing the filter for current or any item */
        $segmentFilter = $this->setupFilter($Params);
        $news = $this->Newsitems()
            ->filter($segmentFilter)
            ->exclude(array('PublishFrom:GreaterThan' => SS_Datetime::now()->format('Y-m-d')))
            ->first();
        $this->current_item = $news;
    }
private function setNews()
    {
        $Params = $this->getURLParams();
        /** @var array $segmentFilter Array containing the filter for current or any item */
        $segmentFilter = $this->setupFilter($Params);
        $news = $this->Newsitems()
            ->filter($segmentFilter)
            ->exclude(array('PublishFrom:GreaterThan' => SS_Datetime::now()->format('Y-m-d')))
            ->first();
        $this->current_item = $news;
    }
private function setNews ( ) { $ Params = $ this -> getURLParams ( ) ; /** @var array $segmentFilter Array containing the filter for current or any item */ $ segmentFilter = $ this -> setupFilter ( $ Params ) ; $ news = $ this -> Newsitems ( ) -> filter ( $ segmentFilter ) -> exclude ( array ( 'PublishFrom:GreaterThan' => SS_Datetime :: now ( ) -> format ( 'Y-m-d' ) ) ) -> first ( ) ; $ this -> current_item = $ news ; }
Set the current newsitem, if available.
Set the current newsitem if available .