protected function renderItem(array $contents, $tag)
{
$position = $this->getPosition($contents);
$heading = $this->getHeading($contents);
$image = $this->getImage($contents, $heading);
$link = $this->getLink($contents, $image, $position);
$body = $this->getBody($contents);
$attributes = new Attributes($this->attributes, ['class' => 'media']);
$string = "<{$tag} {$attributes}>";
$string .= $link;
$string .= "<div class='media-body'>";
if ($heading) {
$string .= "<h4 class='media-heading'>{$heading}</h4>";
}
$string .= $body;
$string .= "</div></{$tag}>";
return $string;
}