title: Override router and add parameter to specific routes (before path/url used)
body: <p>I would use a easy management routing system.</p>
  
  <p>For example NOW i have this routes.</p>
  
  <pre><code>_welcome                    ANY      ANY    ANY  /
  acmedemo_example_index      ANY      ANY    ANY  /acme/demos
  acmedemo_example_edit       ANY      ANY    ANY  /acme/edit/{id}
  acmedemo_example_delete     ANY      ANY    ANY  /acme/delete/{id}
  acmeapi_backup_get          GET      ANY    ANY  /api/acme
  acmeapi_backup_edit         POST     ANY    ANY  /api/acme
  </code></pre>
  
  <p>Now I would add the current user id to each route, because if a user send me or another supporter/administrator a link, we would see what the user see.
  You understand?</p>
  
  <p>I would have this now.</p>
  
  <pre><code>_welcome                    ANY      ANY    ANY  /
  acmedemo_example_index      ANY      ANY    ANY  /{user}/acme/demos
  acmedemo_example_edit       ANY      ANY    ANY  /{user}/acme/edit/{id}
  acmedemo_example_delete     ANY      ANY    ANY  /{user}/acme/delete/{id}
  acmeapi_backup_get          GET      ANY    ANY  /api/acme
  acmeapi_backup_edit         POST     ANY    ANY  /api/acme
  </code></pre>
  
  <p>And now the "problem"... I want to add the "user" parameter to each route automatically if the route name matches <code>preg_match('/^acmedemo_/i')</code>.</p>
  
  <p>For example (index.html.twig):</p>
  
  <pre><code>&lt;a href="{{ path('acmedemo_example_index') }}"&gt;Show demos&lt;/a&gt;
  </code></pre>
  
  <p>Or</p>
  
  <pre><code>&lt;a href="{{ path('acmedemo_example_edit', {id: entity.id}) }}"&gt;Edit demo&lt;/a&gt;
  </code></pre>
  
  <p>I <strong>NOT</strong> want to use <code>{{ path('acmedemo_example_edit', {id: entity.id, user: app.user.id}) }}</code><strong>!</strong></p>
  
  <p>And the "user" parameter requires "\d+".</p>
  
  <p>I would like to override the "generate" function on the router, for example.
  Then I could check if <code>$router-&gt;getUrl()</code> matches the <code>^acmedemo_</code> and then I could add the <code>user</code> parameter :)</p>
  
  <p>Thanks!</p>