public function getForFrontend($pageId)
    {
        return $this->find()
            ->contain(['Current', 'Attributes'])
            ->formatResults([$this, 'formatAttributes'])
            ->where([$this->aliasField('id') => $pageId])
            ->first();
    }
public function getForFrontend($pageId)
    {
        return $this->find()
            ->contain(['Current', 'Attributes'])
            ->formatResults([$this, 'formatAttributes'])
            ->where([$this->aliasField('id') => $pageId])
            ->first();
    }
public function getForFrontend ( $ pageId ) { return $ this -> find ( ) -> contain ( [ 'Current' , 'Attributes' ] ) -> formatResults ( [ $ this , 'formatAttributes' ] ) -> where ( [ $ this -> aliasField ( 'id' ) => $ pageId ] ) -> first ( ) ; }
Find a single page including content and attributes for output in the frontend.

@param int $pageId The page id.
@return Page|null
Find a single page including content and attributes for output in the frontend .