function ArgumentPluginBase::encodeValidatorId
Same name in other branches
- 9 core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php \Drupal\views\Plugin\views\argument\ArgumentPluginBase::encodeValidatorId()
- 8.9.x core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php \Drupal\views\Plugin\views\argument\ArgumentPluginBase::encodeValidatorId()
- 11.x core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php \Drupal\views\Plugin\views\argument\ArgumentPluginBase::encodeValidatorId()
Sanitize validator options including derivatives with : for js.
Reason and alternative: https://www.drupal.org/node/2035345.
Parameters
string $id: The identifier to be sanitized.
Return value
string The sanitized identifier.
See also
decodeValidatorId()
4 calls to ArgumentPluginBase::encodeValidatorId()
- ArgumentPluginBase::buildOptionsForm in core/
modules/ views/ src/ Plugin/ views/ argument/ ArgumentPluginBase.php - Provide a form to edit options for this plugin.
- ArgumentValidateTest::testArgumentValidateUserUid in core/
modules/ user/ tests/ src/ Kernel/ Views/ ArgumentValidateTest.php - Tests the User (ID) argument validator.
- Entity::buildOptionsForm in core/
modules/ views/ src/ Plugin/ views/ argument_validator/ Entity.php - Provides the default form for setting options.
- User::buildOptionsForm in core/
modules/ user/ src/ Plugin/ views/ argument_validator/ User.php - Provides the default form for setting options.
File
-
core/
modules/ views/ src/ Plugin/ views/ argument/ ArgumentPluginBase.php, line 1275
Class
- ArgumentPluginBase
- Base class for argument (contextual filter) handler plugins.
Namespace
Drupal\views\Plugin\views\argumentCode
public static function encodeValidatorId($id) {
return str_replace(':', '---', $id);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.