function TestPluginBase::viewsTokenReplace
Same name and namespace in other branches
- 9 core/modules/views/tests/src/Kernel/Plugin/PluginBaseTest.php \Drupal\Tests\views\Kernel\Plugin\TestPluginBase::viewsTokenReplace()
- 8.9.x core/modules/views/tests/src/Kernel/Plugin/PluginBaseTest.php \Drupal\Tests\views\Kernel\Plugin\TestPluginBase::viewsTokenReplace()
- 11.x core/modules/views/tests/src/Kernel/Plugin/PluginBaseTest.php \Drupal\Tests\views\Kernel\Plugin\TestPluginBase::viewsTokenReplace()
Replaces Views' tokens in a given string.
The resulting string will be sanitized with Xss::filterAdmin.
Parameters
$text: Unsanitized string with possible tokens.
$tokens: Array of token => replacement_value items.
Return value
string
Overrides PluginBase::viewsTokenReplace
File
-
core/
modules/ views/ tests/ src/ Kernel/ Plugin/ PluginBaseTest.php, line 91
Class
- TestPluginBase
- Helper class for using the PluginBase abstract class.
Namespace
Drupal\Tests\views\Kernel\PluginCode
public function viewsTokenReplace($text, $tokens) {
return parent::viewsTokenReplace($text, $tokens);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.