Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Part of #2096923: [meta] Clean-up CommentManager service and deprecate procedural helper functions this will allow for comment module to be more flexible and decoupled from node eventually.
Comment | File | Size | Author |
---|---|---|---|
#9 | 2289989-comment-add-8.patch | 5.16 KB | andypost |
#9 | interdiff.txt | 3.52 KB | andypost |
Comments
Comment #1
marcingy CreditAttribution: marcingy commentedComment #2
larowlanIt should just be removed.
There's an issue to allow render cache callbacks to be services which converts the static call to a service. That leaves only one call to comment add in the form. It can be inlined.
Comment #3
larowlanBTW it is decoupled from node
Comment #4
larowlanActually that issue is fixed #2247779: Allow #pre_render, #post_render and #post_render_cache callbacks to be service methods so comment add can go inline for the remaining call(s) (IMO). My motivation in https://www.drupal.org/node/2247779 was to kill comment add
Comment #5
marcingy CreditAttribution: marcingy commentedRe-rolled inline
Comment #6
marcingy CreditAttribution: marcingy commentedComment #7
larowlanWe should have the field in scope here, no need to use the static. $this->getFieldDefinition() from memory
Comment #9
andypostA couple of fixes:
1) there's comment_type not a "bundle" - take this directly from field
2) use entity form builder variable to prevent collisions with form builder
Suppose this one rtbc
Comment #10
marcingy CreditAttribution: marcingy commentedChanges make sense
Comment #11
alexpottCommitted 4b91f16 and pushed to 8.x. Thanks!
Comment #14
alexpottThe original commit included #2292197: The StringTranslationTrait trait doxygen could use a little love - sorry.
Committed e7f8c6d and pushed to 8.x. Thanks!