/**
  * {@inheritdoc}
  */
 public function buildDatagrid()
 {
     if ($this->datagrid) {
         return;
     }
     $filterParameters = $this->getFilterParameters();
     // transform _sort_by from a string to a FieldDescriptionInterface for the datagrid.
     if (isset($filterParameters['locale']) && is_array($filterParameters['locale'])) {
         $this->filterLocales = array_key_exists('value', $filterParameters['locale']) ? $filterParameters['locale']['value'] : $this->managedLocales;
     }
     parent::buildDatagrid();
 }