Change to be

`$message .= $this->getView()->plugin('sxb_alert')->__invoke($messagesToPrint, $isBlock, $class)->render();`