public function onLabelCallback(array $row, $label, DataContainer $dc, $attributes)
    {
        /** @var Image $imageAdapter */
        $imageAdapter = $this->framework->getAdapter(Image::class);

        // Align the icon with the text
        if (false !== \stripos($attributes, 'style="')) {
            $attributes = \str_replace('style="', 'style="vertical-align:text-top;', $attributes);
        } else {
            $attributes .= \trim($attributes.' style="vertical-align:text-top;"');
        }

        return $imageAdapter->getHtml('iconPLAIN.svg', '', $attributes).' '.$label;
    }
public function onLabelCallback(array $row, $label, DataContainer $dc, $attributes)
    {
        /** @var Image $imageAdapter */
        $imageAdapter = $this->framework->getAdapter(Image::class);

        // Align the icon with the text
        if (false !== \stripos($attributes, 'style="')) {
            $attributes = \str_replace('style="', 'style="vertical-align:text-top;', $attributes);
        } else {
            $attributes .= \trim($attributes.' style="vertical-align:text-top;"');
        }

        return $imageAdapter->getHtml('iconPLAIN.svg', '', $attributes).' '.$label;
    }
public function onLabelCallback ( array $ row , $ label , DataContainer $ dc , $ attributes ) { /** @var Image $imageAdapter */ $ imageAdapter = $ this -> framework -> getAdapter ( Image :: class ) ; // Align the icon with the text if ( false !== \ stripos ( $ attributes , 'style="' ) ) { $ attributes = \ str_replace ( 'style="' , 'style="vertical-align:text-top;' , $ attributes ) ; } else { $ attributes .= \ trim ( $ attributes . ' style="vertical-align:text-top;"' ) ; } return $ imageAdapter -> getHtml ( 'iconPLAIN.svg' , '' , $ attributes ) . ' ' . $ label ; }
On label callback.

@param array         $row
@param string        $label
@param DataContainer $dc
@param string        $attributes

@return string
On label callback .