<?php

class NewsWidget extends Widget {

	public static $title = '';
	public static $cmsTitle = 'News Widget';

	public static $description = 'Naujienų widget\'as';
    
    private $show = '2';
	
	public function LatestNewsItem() {
       
		return DataObject::get('NewsArticle', '', 'OriginalPublishedDate DESC', '', $this->show);
	}
    
    public function NewsHolderURL() {
        return DataObject::get_one('NewsHolder');
    }
}