class EntityLinkEdit

Same name and namespace in other branches
  1. 11.x core/modules/views/src/Plugin/views/field/EntityLinkEdit.php \Drupal\views\Plugin\views\field\EntityLinkEdit
  2. 10 core/modules/views/src/Plugin/views/field/EntityLinkEdit.php \Drupal\views\Plugin\views\field\EntityLinkEdit
  3. 8.9.x core/modules/views/src/Plugin/views/field/EntityLinkEdit.php \Drupal\views\Plugin\views\field\EntityLinkEdit

Field handler to present a link to edit an entity.

Plugin annotation

@ViewsField("entity_link_edit");

Hierarchy

Expanded class hierarchy of EntityLinkEdit

Related topics

File

core/modules/views/src/Plugin/views/field/EntityLinkEdit.php, line 14

Namespace

Drupal\views\Plugin\views\field
View source
class EntityLinkEdit extends EntityLink {
  
  /**
   * {@inheritdoc}
   */
  protected function getEntityLinkTemplate() {
    return 'edit-form';
  }
  
  /**
   * {@inheritdoc}
   */
  protected function renderLink(ResultRow $row) {
    $this->options['alter']['query'] = $this->getDestinationArray();
    return parent::renderLink($row);
  }
  
  /**
   * {@inheritdoc}
   */
  protected function getDefaultLabel() {
    return $this->t('edit');
  }

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.