How to add an 'operations' link to a custom route?
What drupal core version are you using?

Link templates have been changed to links instead of route names a few months ago. See Node and other example entity types.

Another requirement is that link template names and route names need to match.

However, your primary problem is that link templates about the entity or at least entity type that you have, and that's not the case for your example.

Using link templates for operations is convenient when possible but in no way required. It can be any Url object. So your last attempt is actually close, you're just not using the right API yet (and yes, there are definitely way too many ways to generate links/URL's).

Try this:

\Drupal\Core\Url::fromRoute('entity.bloom_stem.add_form', ['bloom_stem_type' =&gt; $entity-&gt;id()])


Then use that for 'url'.