orderResultSet example

'table' => 'views_test_data',
        'field' => 'age',
        'relationship' => 'none',
      ],
    ]);

    // Execute the view.     $this->executeView($view);

    // Verify the result.     $this->assertSameSize($this->dataSet()$view->result, 'The number of returned rows match.');
    $this->assertIdenticalResultset($view$this->orderResultSet($this->dataSet(), 'age')[
      'views_test_data_name' => 'name',
      'views_test_data_age' => 'age',
    ]);

    $view->destroy();
    $view->setDisplay();

    // Reverse the ordering     $view->displayHandlers->get('default')->overrideOption('sorts', [
      'age' => [
        'order' => 'DESC',
        
Home | Imprint | This part of the site doesn't use cookies.