Neos\Neos\Domain\Service\TypoScriptService::generateTypoScriptForNodeType PHP Метод

generateTypoScriptForNodeType() защищенный Метод

A prototype will be rendererd with the generator-class defined in the nodeType-configuration 'fusion.prototypeGenerator'
protected generateTypoScriptForNodeType ( NodeType $nodeType ) : string
$nodeType Neos\ContentRepository\Domain\Model\NodeType
Результат string
    protected function generateTypoScriptForNodeType(NodeType $nodeType)
    {
        if ($nodeType->hasConfiguration('options.fusion.prototypeGenerator') && $nodeType->getConfiguration('options.fusion.prototypeGenerator') !== null) {
            $generatorClassName = $nodeType->getConfiguration('options.fusion.prototypeGenerator');
            if (!class_exists($generatorClassName)) {
                throw new \Neos\Neos\Domain\Exception('Fusion prototype-generator Class ' . $generatorClassName . ' does not exist');
            }
            $generator = $this->objectManager->get($generatorClassName);
            if (!$generator instanceof DefaultPrototypeGeneratorInterface) {
                throw new \Neos\Neos\Domain\Exception('Fusion prototype-generator Class ' . $generatorClassName . ' does not implement interface ' . DefaultPrototypeGeneratorInterface::class);
            }
            return $generator->generate($nodeType);
        }
        return '';
    }