By dawehner on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.0.x
Introduced in version:
8.0.0-beta11
Issue links:
Description:
Views now automatically provides links for every entity type, which means that you have an view /edit as well as delete link available.
API-wise field handlers were changed:
| Before | After |
|---|---|
| Node/Comment/User view link handlers | \Drupal\views\Plugin\views\field\EntityLink |
| Node/Comment/User delete link handlers | \Drupal\views\Plugin\views\field\EntityLinkDelete |
| Node/Comment/User edit link handlers | \Drupal\views\Plugin\views\field\EntityLinkEdit |
A couple of new base classes were introduced:
Drupal\views\Plugin\views\field\LinkBaseshould be extended by all field handlers providing an internal link.Drupal\views\Plugin\views\field\EntityLinkshould be extended by all field handlers implementing additional entity link templates, e.g. the content translation link (which is now added generically to Views data by the Content Translation module).
One of the main reasons to use these new base classes is that they provide automatic access control for the destination route, thus links will be automatically hidden if the user cannot access the target page.
Impacts:
Site builders, administrators, editors
Module developers