Change this to be:
`return $this->getView()->plugin('sxb_alert')->__invoke($messagesToPrint, $isBlock, $class);`

Otherwise it won't work with other renderers.