src/Contao/View/Contao2BackendView/ButtonRenderer.php
private function renderImageAsHtml($src, $alt, $attributes = '')
    {
        /** @var GenerateHtmlEvent $imageEvent */
        $imageEvent = $this->eventDispatcher->dispatch(
            ContaoEvents::IMAGE_GET_HTML,
            new GenerateHtmlEvent($src, $alt, $attributes)
        );

        return $imageEvent->getHtml();
    }
private function renderImageAsHtml($src, $alt, $attributes = '')
    {
        /** @var GenerateHtmlEvent $imageEvent */
        $imageEvent = $this->eventDispatcher->dispatch(
            ContaoEvents::IMAGE_GET_HTML,
            new GenerateHtmlEvent($src, $alt, $attributes)
        );

        return $imageEvent->getHtml();
    }
private function renderImageAsHtml ( $ src , $ alt , $ attributes = '' ) { /** @var GenerateHtmlEvent $imageEvent */ $ imageEvent = $ this -> eventDispatcher -> dispatch ( ContaoEvents :: IMAGE_GET_HTML , new GenerateHtmlEvent ( $ src , $ alt , $ attributes ) ) ; return $ imageEvent -> getHtml ( ) ; }
Render an image as HTML string.

@param string $src        The image path.
@param string $alt        An optional alt attribute.
@param string $attributes A string of other attributes.

@return string
Render an image as HTML string .