You are here

public function DeleteAction::render in Activity 8

Add link to delete action.

inheritdoc}

Overrides FieldPluginBase::render

File

src/Plugin/views/field/DeleteAction.php, line 43

Class

DeleteAction
Field handler to delete the action.

Namespace

Drupal\activity\Plugin\views\field

Code

public function render(ResultRow $values) {
  $id = $values->action_id;
  $link = Link::fromTextAndUrl(t('Delete'), URL::fromUri('internal:/admin/activity/action/delete/' . $id))
    ->toString();
  return $link;
}