public function prototypeDetailsAction($sitePackageKey, $prototypeName)
    {
        $sitePackageKey = $sitePackageKey ?: $this->getDefaultSitePackageKey();

        $prototypePreviewRenderPath = FusionService::RENDERPATH_DISCRIMINATOR . str_replace(['.', ':'], ['_', '__'], $prototypeName);

        // render html
        $fusionView = new FusionView();
        $fusionView->setControllerContext($this->getControllerContext());
        $fusionView->setFusionPath($prototypePreviewRenderPath);
        $fusionView->setPackageKey($sitePackageKey);

        // render fusion source
        $fusionObjectTree = $this->fusionService->getMergedFusionObjectTreeForSitePackage($sitePackageKey);
        $fusionAst =  $fusionObjectTree['__prototypes'][$prototypeName];
        $fusionCode = ReverseFusionParser::restorePrototypeCode($prototypeName, $fusionAst);

        $result = [
            'prototypeName' => $prototypeName,
            'renderedCode' => $fusionCode,
            'parsedCode' => Yaml::dump($fusionAst, 99),
            'fusionAst' => $fusionAst,
            'anatomy' => $this->fusionService->getAnatomicalPrototypeTreeFromAstExcerpt($fusionAst)
        ];

        $this->view->assign('value', $result);
    }
public function prototypeDetailsAction($sitePackageKey, $prototypeName)
    {
        $sitePackageKey = $sitePackageKey ?: $this->getDefaultSitePackageKey();

        $prototypePreviewRenderPath = FusionService::RENDERPATH_DISCRIMINATOR . str_replace(['.', ':'], ['_', '__'], $prototypeName);

        // render html
        $fusionView = new FusionView();
        $fusionView->setControllerContext($this->getControllerContext());
        $fusionView->setFusionPath($prototypePreviewRenderPath);
        $fusionView->setPackageKey($sitePackageKey);

        // render fusion source
        $fusionObjectTree = $this->fusionService->getMergedFusionObjectTreeForSitePackage($sitePackageKey);
        $fusionAst =  $fusionObjectTree['__prototypes'][$prototypeName];
        $fusionCode = ReverseFusionParser::restorePrototypeCode($prototypeName, $fusionAst);

        $result = [
            'prototypeName' => $prototypeName,
            'renderedCode' => $fusionCode,
            'parsedCode' => Yaml::dump($fusionAst, 99),
            'fusionAst' => $fusionAst,
            'anatomy' => $this->fusionService->getAnatomicalPrototypeTreeFromAstExcerpt($fusionAst)
        ];

        $this->view->assign('value', $result);
    }
public function prototypeDetailsAction ( $ sitePackageKey , $ prototypeName ) { $ sitePackageKey = $ sitePackageKey ? : $ this -> getDefaultSitePackageKey ( ) ; $ prototypePreviewRenderPath = FusionService :: RENDERPATH_DISCRIMINATOR . str_replace ( [ '.' , ':' ] , [ '_' , '__' ] , $ prototypeName ) ; // render html $ fusionView = new FusionView ( ) ; $ fusionView -> setControllerContext ( $ this -> getControllerContext ( ) ) ; $ fusionView -> setFusionPath ( $ prototypePreviewRenderPath ) ; $ fusionView -> setPackageKey ( $ sitePackageKey ) ; // render fusion source $ fusionObjectTree = $ this -> fusionService -> getMergedFusionObjectTreeForSitePackage ( $ sitePackageKey ) ; $ fusionAst = $ fusionObjectTree [ '__prototypes' ] [ $ prototypeName ] ; $ fusionCode = ReverseFusionParser :: restorePrototypeCode ( $ prototypeName , $ fusionAst ) ; $ result = [ 'prototypeName' => $ prototypeName , 'renderedCode' => $ fusionCode , 'parsedCode' => Yaml :: dump ( $ fusionAst , 99 ) , 'fusionAst' => $ fusionAst , 'anatomy' => $ this -> fusionService -> getAnatomicalPrototypeTreeFromAstExcerpt ( $ fusionAst ) ] ; $ this -> view -> assign ( 'value' , $ result ) ; }
Render informations about the given prototype

@Flow\SkipCsrfProtection
@param string $sitePackageKey
@param string $prototypeName
@return void
Render informations about the given prototype