public function getFlashMessages($type, $domain = null)
    {
        @trigger_error(
            'Method "FlashMessageExtension::getFlashMessages()" is deprecated since SonataCoreBundle 3.11.0 and will'.
            ' be removed in 4.0. Use the FlashMessageRuntime instead.',
            E_USER_DEPRECATED
        );

        return $this->flashManager->get($type, $domain);
    }