/**
  * {@inheritdoc}
  */
 public function addFieldSorter($field, $direction)
 {
     $alias = 'sorterCompleteness';
     $util = new CompletenessJoin($this->qb);
     $util->addJoins($alias);
     $this->qb->addOrderBy($alias . '.ratio', $direction);
     return $this;
 }
 /**
  * {@inheritdoc}
  */
 public function apply(DatasourceInterface $datasource, DatagridConfiguration $configuration)
 {
     $qb = $datasource->getQueryBuilder();
     $joinAlias = 'selectCompleteness';
     $util = new CompletenessJoin($qb);
     $util->addJoins($joinAlias);
     $qb->addSelect($joinAlias . '.ratio AS ratio');
 }