Neos\Neos\Domain\Service\DefaultPluginPrototypeGenerator::generate PHP Метод

generate() публичный Метод

A node will be rendered by Neos.Neos:Content by default with a template in resource://PACKAGE_KEY/Private/Templates/NodeTypes/NAME.html and forwards all public node properties to the template TypoScript object.
public generate ( NodeType $nodeType ) : string
$nodeType Neos\ContentRepository\Domain\Model\NodeType
Результат string
    public function generate(NodeType $nodeType)
    {
        if (strpos($nodeType->getName(), ':') === false) {
            return '';
        }
        $output = 'prototype(' . $nodeType->getName() . ') < prototype(Neos.Neos:Plugin) {' . chr(10);
        list($packageKey, $relativeName) = explode(':', $nodeType->getName(), 2);
        $output .= "\t" . 'package = "' . $packageKey . '"' . chr(10);
        $output .= "\t" . 'subpackage = ""' . chr(10);
        $output .= "\t" . 'controller = "Standard"' . chr(10);
        $output .= "\t" . 'action = "index"' . chr(10);
        $output .= '}' . chr(10);
        return $output;
    }
DefaultPluginPrototypeGenerator