protected function ConfigTranslationUiTest::renderContextualLinks in Drupal 8
Same name and namespace in other branches
- 9 core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationUiTest::renderContextualLinks()
- 10 core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationUiTest::renderContextualLinks()
Get server-rendered contextual links for the given contextual link ids.
Parameters
array $ids: An array of contextual link ids.
string $current_path: The Drupal path for the page for which the contextual links are rendered.
Return value
string The response body.
File
- core/
modules/ config_translation/ tests/ src/ Functional/ ConfigTranslationUiTest.php, line 1137
Class
- ConfigTranslationUiTest
- Translate settings and entities to various languages.
Namespace
Drupal\Tests\config_translation\FunctionalCode
protected function renderContextualLinks($ids, $current_path) {
$post = [];
for ($i = 0; $i < count($ids); $i++) {
$post['ids[' . $i . ']'] = $ids[$i];
}
return $this
->drupalPostWithFormat('contextual/render', 'json', $post, [
'query' => [
'destination' => $current_path,
],
]);
}