protected function getMessagesForRender($type = null)
    {
        if (is_null($type)) {
            if (count($this->groupForRender) > 0) {
                $messages = array();

                foreach ($this->groupForRender as $typeToRender) {
                    $messages = array_merge($messages, $this->get($typeToRender)->all());
                }

                return new Collection($messages);
            }

            return $this->all();
        }
        return $this->get($type);
    }