天天看點

FOSCommentBundle功能包:導入FOSCommentBundle路由Step 3: Import FOSCommentBundle routing

Import the bundle routing:

導入功能包路由:

1

2

3

4

5

<code>fos_comment_api:</code>

<code>    </code><code>type: rest</code>

<code>    </code><code>resource: </code><code>"@FOSCommentBundle/Resources/config/routing.yml"</code>

<code>    </code><code>prefix: /api</code>

<code>    </code><code>defaults: { _format: html }</code>

Note:

注意:

The <code>type: rest</code> part is important. <code>type: rest部分是重要的。</code>
The defaults configuration may not be necessary unless you have changed FOSRestBundle's default format. defaults 配置項也許沒必要,除非您已經改變了 FOSRestBundle 的預設格式。

When you're done. Continue with the final step: enabling the comments on a page:

當您已經完成,繼續最後一步:在頁面中啟用評論:

第4步:在頁面中啟用評論。

本文轉自 firehare 51CTO部落格,原文連結:http://blog.51cto.com/firehare/1257647,如需轉載請自行聯系原作者

繼續閱讀