ViewsTestDataAlterHooks.php

Namespace

Drupal\views_test_data_alter\Hook

File

core/modules/views/tests/modules/views_test_data_alter/src/Hook/ViewsTestDataAlterHooks.php

View source
<?php

declare (strict_types=1);
namespace Drupal\views_test_data_alter\Hook;

use Drupal\Core\Hook\Attribute\Hook;
class ViewsTestDataAlterHooks {
    
    /**
     * Implements hook_views_data_alter().
     */
    public function viewsDataAlter(array &$data) : void {
        // Modify a filter to use a different filter handler plugin
        // by default so that we can test that the handler used
        // respects the handler plugin ID specified in the
        // configuration.
        $data['node_field_data']['status']['filter']['id'] = 'numeric';
    }

}

Classes

Title Deprecated Summary
ViewsTestDataAlterHooks

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.