protected function getDefaultOperations(EntityInterface $entity) {
    $operations = [];
    if ($entity->access('update') && $entity->hasLinkTemplate('edit-form')) {
      $operations['edit'] = [
        'title' => $this->t('Edit'),
        'weight' => 10,
        'url' => $entity->urlInfo('edit-form'),
      ];
    }
    if ($entity->access('delete') && $entity->hasLinkTemplate('delete-form')) {
      $operations['delete'] = [
        'title' => $this->t('Delete'),
        'weight' => 100,
        'url' => $entity->urlInfo('delete-form'),
      ];
    }

    return $operations;
  }
protected function getDefaultOperations(EntityInterface $entity) {
    $operations = [];
    if ($entity->access('update') && $entity->hasLinkTemplate('edit-form')) {
      $operations['edit'] = [
        'title' => $this->t('Edit'),
        'weight' => 10,
        'url' => $entity->urlInfo('edit-form'),
      ];
    }
    if ($entity->access('delete') && $entity->hasLinkTemplate('delete-form')) {
      $operations['delete'] = [
        'title' => $this->t('Delete'),
        'weight' => 100,
        'url' => $entity->urlInfo('delete-form'),
      ];
    }

    return $operations;
  }
protected function getDefaultOperations ( EntityInterface $ entity ) { $ operations = [ ] ; if ( $ entity -> access ( 'update' ) && $ entity -> hasLinkTemplate ( 'edit-form' ) ) { $ operations [ 'edit' ] = [ 'title' => $ this -> t ( 'Edit' ) , 'weight' => 10 , 'url' => $ entity -> urlInfo ( 'edit-form' ) , ] ; } if ( $ entity -> access ( 'delete' ) && $ entity -> hasLinkTemplate ( 'delete-form' ) ) { $ operations [ 'delete' ] = [ 'title' => $ this -> t ( 'Delete' ) , 'weight' => 100 , 'url' => $ entity -> urlInfo ( 'delete-form' ) , ] ; } return $ operations ; }
Gets this list's default operations.

@param \Drupal\Core\Entity\EntityInterface $entity
The entity the operations are for.

@return array
The array structure is identical to the return value of
self::getOperations().
Gets this list s default operations .