protected function getFlashMessengerHelper()
    {
        if ($this->flashMessengerHelper) {
            return $this->flashMessengerHelper;
        }

        if (method_exists($this->view, 'plugin')) {
            $this->flashMessengerHelper = $this->view->plugin('flashmessenger');
        }

        if (!$this->flashMessengerHelper instanceof FlashMessenger) {
            $this->flashMessengerHelper = new FlashMessenger();
            $this->flashMessengerHelper->setView($this->getView());
        }

        return $this->flashMessengerHelper;
    }