function RelationshipJoinTestBase::viewsData

Same name in other branches
  1. 9 core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinTestBase.php \Drupal\Tests\views\Kernel\Plugin\RelationshipJoinTestBase::viewsData()
  2. 8.9.x core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinTestBase.php \Drupal\Tests\views\Kernel\Plugin\RelationshipJoinTestBase::viewsData()
  3. 11.x core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinTestBase.php \Drupal\Tests\views\Kernel\Plugin\RelationshipJoinTestBase::viewsData()

Overrides \Drupal\views\Tests\ViewTestBase::viewsData().

Adds a relationship for the uid column.

1 call to RelationshipJoinTestBase::viewsData()
RelationshipJoinInTest::viewsData in core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinInTest.php
Adds an IN condition for the user name.
1 method overrides RelationshipJoinTestBase::viewsData()
RelationshipJoinInTest::viewsData in core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinInTest.php
Adds an IN condition for the user name.

File

core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinTestBase.php, line 70

Class

RelationshipJoinTestBase
Provides a base class for a testing a relationship.

Namespace

Drupal\Tests\views\Kernel\Plugin

Code

protected function viewsData() {
    $data = parent::viewsData();
    $data['views_test_data']['uid'] = [
        'title' => new TranslatableMarkup('UID'),
        'help' => new TranslatableMarkup('The test data UID'),
        'relationship' => [
            'id' => 'standard',
            'base' => 'users_field_data',
            'base field' => 'uid',
        ],
    ];
    return $data;
}

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