You are here

protected function ViewsBulkEditTest::getBulkKey in Views Bulk Edit 8

Generate the entity bulk key for the form.

4 calls to ViewsBulkEditTest::getBulkKey()
ViewsBulkEditTest::testBulkEditMultipleBundles in tests/src/Functional/ViewsBulkEditTest.php
Test editing an article and a page bundle.
ViewsBulkEditTest::testFieldsNotDisplayedAreIgnored in tests/src/Functional/ViewsBulkEditTest.php
Test non-configured fields are not displayed.
ViewsBulkEditTest::testOnlySelectedValuesAreChanged in tests/src/Functional/ViewsBulkEditTest.php
Values that are not selected or displayed are never changed.
ViewsBulkEditTest::testViewsBulkEdit in tests/src/Functional/ViewsBulkEditTest.php
Test VBE from the UI using the node module.

File

tests/src/Functional/ViewsBulkEditTest.php, line 172

Class

ViewsBulkEditTest
Tests the Views Bulk Edit feature.

Namespace

Drupal\Tests\views_bulk_edit\Functional

Code

protected function getBulkKey(NodeInterface $entity) {
  $key_parts = [
    $entity
      ->language()
      ->getId(),
    $entity
      ->id(),
  ];
  $json = json_encode($key_parts);
  return base64_encode($json);
}