articles = $articles;
}
public function render() {
ob_start();
?>
articles as $article) :
/**
* @var NewsItem $article
*/
$id = $article->getId();
$title = $article->getTitle();
$publishedDate = $article->getPublishedString();
$newsDate = $article->getPublishedDate()->format('d-M-Y');
$permanentLink = "#" .$id;
foreach($article->getLink() as $link) {
if ($link["rel"] === "via") {
$permanentLink = $link["href"];
break;
}
}
$content = $article->getContent();
$image = "";
$newsImage = $article->getNewsImage();
if(isset($newsImage["link"]) && $newsImage["content"]) {
$image = "
" . $this->renderImage($newsImage) . "";
}
$event = '';
if ($article->hasCategory('conferences') || $article->hasCategory('cfp')) {
$event = " vevent";
}
echo "
";
endforeach;
?>
More news »
= 4) {
$imageHtml .= $imageDetails[3];
}
$imageHtml .= "/>";
return $imageHtml;
}
}