21365250381fcb1c16c1a89ff0b4653a0621ea5b
[yaffs-website] / web / core / modules / views / src / Plugin / views / field / EntityLinkEdit.php
1 <?php
2
3 namespace Drupal\views\Plugin\views\field;
4
5 use Drupal\views\ResultRow;
6
7 /**
8  * Field handler to present a link to edit an entity.
9  *
10  * @ingroup views_field_handlers
11  *
12  * @ViewsField("entity_link_edit")
13  */
14 class EntityLinkEdit extends EntityLink {
15
16   /**
17    * {@inheritdoc}
18    */
19   protected function getEntityLinkTemplate() {
20     return 'edit-form';
21   }
22
23   /**
24    * {@inheritdoc}
25    */
26   protected function renderLink(ResultRow $row) {
27     $this->options['alter']['query'] = $this->getDestinationArray();
28     return parent::renderLink($row);
29   }
30
31   /**
32    * {@inheritdoc}
33    */
34   protected function getDefaultLabel() {
35     return $this->t('edit');
36   }
37
38 }