New answers tagged

6 votes

How do I get a list the comment types' machine name?

Comment types are an entity type, so you can load them as with any entity type, and get the machine name from CommentType::id(): $comment_types = array_map( function ($comment_type) { return $...
user avatar
  • 15k

Top 50 recent answers are included