Bootstrapper\MediaObject::getImage PHP Метод

getImage() защищенный Метод

Get the image of the media object
protected getImage ( array $contents, string $alt ) : string
$contents array
$alt string The alt text of the image
Результат string
    protected function getImage(array $contents, $alt)
    {
        if (!isset($contents['image'])) {
            throw new MediaObjectException("You must pass in an image to each object");
        }
        $image = $contents['image'];
        $attributes = new Attributes(['class' => 'media-object', 'src' => $image, 'alt' => $alt]);
        return "<img {$attributes}>";
    }