FOSCommentBundle | Threaded comments for Symfony | Web Framework library
kandi X-RAY | FOSCommentBundle Summary
kandi X-RAY | FOSCommentBundle Summary
Threaded comments for Symfony
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Returns the configuration tree builder .
- Handles the configuration .
- Gets a thread comments
- Executes the command .
- Find comments by thread .
- Authorize the vote .
- Process the Sorting factories .
- Checks if the vote is valid
- Returns true if the thread can be created .
- Install the fallback ACL .
FOSCommentBundle Key Features
FOSCommentBundle Examples and Code Snippets
Community Discussions
Trending Discussions on FOSCommentBundle
QUESTION
I want to add the Username field (input) in bundle FOSCommentBundle without using FOSUserBundlde.
the user must enter his username and comment. The basic model does not offer the pseudo field because it relies on the connected user or "anonymous" if no connected user.
Can you tell me how to do this?
Symfony 4.4
Thank's
...ANSWER
Answered 2020-Feb-25 at 12:58The comment in the bundle is just an entity decalred in the configuration. I suppose you did that ?
Create your own comment entityhttps://github.com/FriendsOfSymfony/FOSCommentBundle/blob/master/Resources/doc/2a-mapping_orm.md
So I think you just have to add new property $userName
to your comment entity. I found this https://github.com/FriendsOfSymfony/FOSCommentBundle/issues/334
I never used that bundle but what is answered in the issue comment is pure symfony behavior. You have to override Bundle's Form and template.
That Form : https://github.com/FriendsOfSymfony/FOSCommentBundle/blob/master/Form/CommentType.php
And that template : https://github.com/FriendsOfSymfony/FOSCommentBundle/blob/master/Resources/views/Thread/comment_new_content.html.twig
To override the FormType from any bundle
https://symfony.com/doc/4.4/form/create_form_type_extension.html
and to override templates
https://symfony.com/doc/current/bundles/override.html#templates
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install FOSCommentBundle
PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page