protected function SimpleSitemapViewsTestBase::addRecordToIndex in Simple XML sitemap 4.x
Same name and namespace in other branches
- 8.3 modules/simple_sitemap_views/tests/src/Functional/SimpleSitemapViewsTestBase.php \Drupal\Tests\simple_sitemap_views\Functional\SimpleSitemapViewsTestBase::addRecordToIndex()
Adds a record to the arguments index.
Parameters
string $view_id: The view ID.
string $display_id: The view display ID.
array $args_ids: A set of argument IDs.
array $args_values: A set of argument values.
Throws
\Exception
1 call to SimpleSitemapViewsTestBase::addRecordToIndex()
- SimpleSitemapViewsTest::testGarbageCollector in modules/
simple_sitemap_views/ tests/ src/ Functional/ SimpleSitemapViewsTest.php - Tests the garbage collection process.
File
- modules/
simple_sitemap_views/ tests/ src/ Functional/ SimpleSitemapViewsTestBase.php, line 102
Class
- SimpleSitemapViewsTestBase
- Defines a base class for Simple XML Sitemap (Views) functional testing.
Namespace
Drupal\Tests\simple_sitemap_views\FunctionalCode
protected function addRecordToIndex($view_id, $display_id, array $args_ids, array $args_values) {
$args_ids = implode(SimpleSitemapViews::ARGUMENT_SEPARATOR, $args_ids);
$args_values = implode(SimpleSitemapViews::ARGUMENT_SEPARATOR, $args_values);
// Insert a record into the index table.
$query = $this->database
->insert('simple_sitemap_views');
$query
->fields([
'view_id' => $view_id,
'display_id' => $display_id,
'arguments_ids' => $args_ids,
'arguments_values' => $args_values,
]);
$query
->execute();
}