Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x

EntityLinkEdit.php

Namespace

Drupal\views\Plugin\views\field

File

core/modules/views/src/Plugin/views/field/EntityLinkEdit.php

View source
<?php

namespace Drupal\views\Plugin\views\field;

use Drupal\views\Attribute\ViewsField;
use Drupal\views\ResultRow;

/**
 * Field handler to present a link to edit an entity.
 *
 * @ingroup views_field_handlers
 */
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');
    }

}

Classes

Title Deprecated Summary
EntityLinkEdit Field handler to present a link to edit an entity.

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal