Symfony CMF StaticContent show all child blocks in PHPCTRee?

拟墨画扇 提交于 2020-01-05 08:39:42

问题


Does anybody know how I can make all child blocks show up on the CMF Tree in the Sonata Admin for the StaticContent class?

The way our system uses the Symfony\Cmf\Bundle\ContentBundle\Doctrine\Phpcr\StaticContent class is to just use it as a content document that we can attach other blocks to. I thought that was the purpose of the ContentBundle. Instead only blocks inside of this additionalInfoBlock container block appear in the tree. Unless I am doing something wrong. I have looked at

Symfony/Cmf/Bundle/ContentBundle/Resources/config/doctrine-model/StaticContent.phpcr.xml:

<child name="additionalInfoBlock">
   <cascade><cascade-persist /></cascade>
</child>

There has to be way to get all the child blocks show. I just dont want to start hacking the PHPCRTree class to do this. Do I extend StaticContent and hopefully it will show all children? How do I go about this if that is the answer. Or is there another setting.

See this image below of what I can see in jackrabbitexplorer vs what is in the CMF Tree in the Sonata admin

![Sonata Admin and jackrabbitexplorer representation of StaticContent class children]http://i43.tinypic.com/160whlt.png

来源:https://stackoverflow.com/questions/21146260/symfony-cmf-staticcontent-show-all-child-blocks-in-phpctree

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!