process() публичный Метод

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.
public process ( ) : ResponseData
Результат OpenSkill\Datatable\Data\ResponseData The processed data
 public function testDefaultOrderMulti()
 {
     $data = [['id' => 1, 'name' => 'foo'], ['id' => 2, 'name' => 'bar'], ['id' => 3, 'name' => 'foo'], ['id' => 4, 'name' => 'bar']];
     $queryConfiguration = QueryConfigurationBuilder::create()->start(0)->length(4)->drawCall(1)->columnOrder('name', 'asc')->columnOrder('id', 'desc')->build();
     $columnConfiguration = ColumnConfigurationBuilder::create()->name('id')->build();
     $columnConfiguration2 = ColumnConfigurationBuilder::create()->name('name')->build();
     $provider = new CollectionProvider(new Collection($data));
     $provider->prepareForProcessing($queryConfiguration, [$columnConfiguration, $columnConfiguration2]);
     $data = $provider->process();
     $this->assertSame(4, $data->data()->count());
     $first = $data->data()->first();
     $second = $data->data()->get(1);
     $this->assertSame(4, $first['id']);
     $this->assertSame(2, $second['id']);
 }
 public function testCustomColumn()
 {
     $data = [['id' => 1, 'name' => 'foo'], ['id' => 2, 'name' => 'bar']];
     $queryConfiguration = QueryConfigurationBuilder::create()->start(0)->length(2)->columnSearch('id', 'foo')->drawCall(1)->build();
     $columnConfiguration = ColumnConfigurationBuilder::create()->name('id')->build();
     $provider = new CollectionProvider(new Collection($data));
     $provider->searchColumn('id', function ($data, $search) {
         // we only accept columns with the id 1 if the user searched in the column
         return $data['id'] == 1;
     });
     $provider->prepareForProcessing($queryConfiguration, [$columnConfiguration]);
     $data = $provider->process();
     $this->assertSame(1, $data->data()->count());
 }