/**
  * This method should process all configurations and prepare the underlying data for the view. It will arrange the
  * data and provide the results in a DTData object.
  * It will be called after {@link #prepareForProcessing} has been called and needs to return the processed data in
  * a DTData object so the Composer can further handle the data.
  *
  * @return ResponseData The processed data
  *
  */
 public function process()
 {
     // check if the query configuration is set
     if (is_null($this->queryConfiguration) || empty($this->columnConfiguration)) {
         throw new \InvalidArgumentException("Provider was not configured. Did you call prepareForProcessing first?");
     }
     // compile the collection first
     $this->compileCollection($this->columnConfiguration);
     // sort
     $this->sortCollection();
     // slice the result into the right size
     return new ResponseData($this->collection->slice($this->queryConfiguration->start(), $this->queryConfiguration->length()), $this->totalInitialDataCount);
 }
 /**
  * Will limit a query based on the start and length given
  */
 private function limitQuery()
 {
     $this->query->skip($this->queryConfiguration->start());
     $this->query->limit($this->queryConfiguration->length());
 }