private function validateStructure($type, $template)
    {
        $valid = true;

        $metadata = $this->structureMetadataFactory->getStructureMetadata($type, $template);

        if (!$metadata) {
            throw new \RuntimeException(
                sprintf(
                    'Structure meta data not found for type "%s" and template "%s".',
                    $type,
                    $template
                )
            );
        }

        foreach (['title', 'url'] as $property) {
            if (!$metadata->hasProperty($property)) {
                throw new \RuntimeException(
                    sprintf(
                        'No property "%s" found in "%s" template.',
                        $property,
                        $metadata->getName()
                    )
                );
            }
        }

        $this->validateTwigTemplate($metadata->getView() . '.html.twig');
        $this->validateControllerAction($metadata->getController());

        return $valid;
    }