public function render()
    {
        $template_variables = $this->prepareRender();

        if ($this->configuration->developerMode()) {
            $this->validate(true);
        }

        // Decode/encode turns the full array/object into an array.
        // Just typecasting to an array does not recursively apply it.
        $template_array = json_decode(json_encode($template_variables), true);

        if (!empty($template_variables->template)) {
            return $this->twig->render($template_variables->template, $template_array);
        } else {
            $log_vars = array('%schema' => '');
            if (isset($this->schema_name)) {
                $log_vars['%schema'] = $this->schema_name;
            } elseif (isset($this->schema_path)) {
                $log_vars['%schema'] = $this->schema_path;
            }
            $this->logger->notice('Cannot render: Missing template property in schema %schema.', $log_vars);
        }
    }