You are here

protected function ExampleContentTrait::indexItems in Facets 8

Indexes all (unindexed) items on the specified index.

Parameters

string $index_id: The ID of the index on which items should be indexed.

Return value

int The number of successfully indexed items.

24 calls to ExampleContentTrait::indexItems()
AggregatedFieldTest::setUp in tests/src/Functional/AggregatedFieldTest.php
BreadcrumbIntegrationTest::setUp in tests/src/Functional/BreadcrumbIntegrationTest.php
FacetsUrlGeneratorTest::setUp in tests/src/Functional/FacetsUrlGeneratorTest.php
HierarchicalFacetIntegrationTest::setUp in tests/src/Functional/HierarchicalFacetIntegrationTest.php
HierarchicalFacetIntegrationTest::setUp in modules/facets_summary/tests/src/Functional/HierarchicalFacetIntegrationTest.php

... See full list

File

tests/src/Functional/ExampleContentTrait.php, line 90

Class

ExampleContentTrait
Contains helpers to create data that can be used by tests.

Namespace

Drupal\Tests\facets\Functional

Code

protected function indexItems($index_id) {

  /** @var \Drupal\search_api\IndexInterface $index */
  $index = Index::load($index_id);
  return $index
    ->indexItems();
}