public function getStateMessage(ModelState $state)
    {
        $message = '';

        if ($state->getSuccessful()) {
            $data = $state->getData();

            $message = isset($data['success_message']) ? $data['success_message'] : '';
        } else {
            $message = implode("\n", $state->getErrors());
        }

        return $message;
    }