public function getImageDataUri($imageFormat = 'png')
    {
        $renderer = $this->getRenderer($imageFormat);
        $this->draw($renderer, $this->getIconBounds());
        $mimeType = $renderer->getMimeType();
        $base64 = base64_encode($renderer->getData());
        return "data:$mimeType;base64,$base64";
    }
public function getImageDataUri($imageFormat = 'png')
    {
        $renderer = $this->getRenderer($imageFormat);
        $this->draw($renderer, $this->getIconBounds());
        $mimeType = $renderer->getMimeType();
        $base64 = base64_encode($renderer->getData());
        return "data:$mimeType;base64,$base64";
    }
public function getImageDataUri ( $ imageFormat = 'png' ) { $ renderer = $ this -> getRenderer ( $ imageFormat ) ; $ this -> draw ( $ renderer , $ this -> getIconBounds ( ) ) ; $ mimeType = $ renderer -> getMimeType ( ) ; $ base64 = base64_encode ( $ renderer -> getData ( ) ) ; return "data:$mimeType;base64,$base64" ; }
Renders the icon as a data URI. It is recommended to avoid using this
method unless really necessary, since it will effectively disable client
caching of generated icons, and will also cause the same icon to be
rendered multiple times, when used multiple times on a single page.

@param string $imageFormat The image format of the data URI.
Supported values are 'png' and 'svg'.
@return string
Renders the icon as a data URI . It is recommended to avoid using this method unless really necessary since it will effectively disable client caching of generated icons and will also cause the same icon to be rendered multiple times when used multiple times on a single page .