Score:0

How do I add a revisions tab to a custom content entity and list revisions?

in flag

I'm trying to achieve exactly what's described on How to add revisions tab to a custom content entity and list revisions?

I created my custom entity using Drush, and set it revisionable: Doin that, I got the entity class with all the entries mentioned at that post, except my_node.routing.yml, which hasn't been created by Drush.

I'm trying to create it manually but without success. The example described at the answer for the mentioned posts seems to refer as a "node" as the custom entity type, which isn't my case. Maybe I've to create also a specific Controller for the custom entity. I'm using Drupal 9.2.10.

apaderno avatar
us flag
Welcome to Drupal Answers! The answer for the other question shows what the Node module does for its entity. It uses the code taken from a Drupal core module as example. since without any details about the custom entity, it's impossible to say *You need to use an annotation like this.*
apaderno avatar
us flag
Using an annotation with placeholders the user should replace with the correct values for the custom entity would not be more useful. The answer for this question would be the same given to the other question, since in this question there aren't details about the custom entity, nor information about what exactly you don't understand in achieving the task.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.