How make a virtual field for view?
Thank to Clive for guide me :

This is how i make a virtual field :

First you need to create the handler for the field :

&lt;?php

namespace Drupal\boutique\Plugin\views\field;

use Drupal\views\Plugin\views\field\FieldPluginBase;
use Drupal\views\Plugin\views\display\DisplayPluginBase;
use Drupal\views\ResultRow;
use Drupal\views\ViewExecutable;

/**
 * Field handler to present the path to the node.
 *
 * @ingroup views_field_handlers
 *
 * @ViewsField("totalCommandeTTC")
 */
class TotalTTC extends FieldPluginBase {

    /**
     * {@inheritdoc}
     */
    public function init(ViewExecutable $view, DisplayPluginBase $display, array &amp;$options = NULL) {
        parent::init($view, $display, $options);

    }

    /**
     * {@inheritdoc}
     */
    public function query() {
        }

    /**
     * {@inheritdoc}
     */
    public function render(ResultRow $values) {
       return 'test';
    }

}


I remove the query for this handler.

Then in my module file, i use the hook_views_data :

function boutique_views_data()
{

  $data['commandes_entity'] = array(

      'totalCommandeTTC' =&gt; array(
          'title' =&gt; t('Total Commande TTC'),
          'help' =&gt; t("Le total TTC des commandes"),
          'field' =&gt; array(
              'id' =&gt; 'totalCommandeTTC',
          ),


      ),

  );

return $data;
}


And the result in views after add the field with views ui :



The field is Total commande TTC.