How do I make a link to a flagging edit page? I'm using Drupal 8 with Flag 4.0-beta1.
On my flag, I have several fields. I want users to be able to edit these fields after making the flag.
How can I make a link to edit the flagging?
I tried various things in Views (making a view of flaggings; making a view of nodes with flaggings as a relationship), but I can't find a way to get an edit link to the flagging (to edit the fields on the flag itself).
NOTE: This question is about flaggings (an instance of a flag).  Here's the same question about flags.
Digging into the flag module a little, I can see this entry in flag.routing.yml that appears to be for your Flagging edit screen.
flag.field_entry.edit:
  path: '/flag/details/edit/{flag}/{entity_id}'
  defaults:
    _controller: '\Drupal\flag\Controller\FieldEntryFormController::edit'
    _title_callback: '\Drupal\flag\Controller\FieldEntryFormController::editTitle'
  requirements:
    _flag_access: 'entity:flag{flag}'

You can build out the link to the flagging manually, e.g.
&lt;a href='/flag/details/edit/FLAG_ID/FLAGGING_ID'&gt;Edit My Flagging&lt;/a&gt;

Or if you're working with twig, e.g. rewriting a view's field, make sure you're also including the flag's id and flagging's id in the view then rewrite doing something like:
&lt;a href='/flag/details/edit/{{ FLAG_ID }}/{{ FLAGGING_ID }}'&gt;{{ &quot;Edit Flagging&quot;|t }}&lt;/a&gt;

Or you can use PHP to build the url directly from the route. It's recommended to use one of the following methods if you're working in PHP.
To get just the url text or object in PHP, use Url::fromRoute():
use \Drupal\Core\Url;

$my_flagging_url_object = Url::fromRoute('flag.field_entry.edit', [
  'flag' =&gt; FLAG_ID,
  'entity_id' =&gt; FLAGGING_ID,
]);
// $my_flagging_url_string returns something like &quot;/flag/details/edit/123/1234&quot;
$my_flagging_url_string = $my_flagging_url_object-&gt;toString();

To build the whole link in PHP, use Link::createFromRoute():
use \Drupal\core\Link;

$my_flagging_edit_link = Link::createFromRoute('MY FLAGGING EDIT TEXT', 'flag.field_entry.edit', [
  'flag' =&gt; FLAG_ID,
  'entity_id' =&gt; FLAGGING_ID,
]);