Indatus\Ranger\ContentType\HtmlContentType::render PHP Method

render() public method

public render ( array $content )
$content array
    public function render(array $content)
    {
        $responseCode = return_keys_value_if_exists('response_code', $content);
        if (is_null($responseCode)) {
            throw new Exception('there needs to be a response code in the content');
        }
        $requestMethod = strtolower($this->requestContainer->getRequestMethod());
        //only post, put, and delete request handle redirects
        if ($requestMethod == 'put' || $requestMethod == 'post' || $requestMethod == 'delete') {
            return $this->doRedirect($responseCode);
        }
        return $this->showView($content);
    }