You are here

public static function ArgumentPluginBase::encodeValidatorId in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 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/src/Tests/Views/ArgumentValidateTest.php
Tests the User (ID) argument validator.
Entity::buildOptionsForm in core/modules/views/src/Plugin/views/argument_validator/Entity.php
Provide the default form for setting options.
User::buildOptionsForm in core/modules/user/src/Plugin/views/argument_validator/User.php
Provide the default form for setting options.

File

core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php, line 1216
Contains \Drupal\views\Plugin\views\argument\ArgumentPluginBase.

Class

ArgumentPluginBase
Base class for argument (contextual filter) handler plugins.

Namespace

Drupal\views\Plugin\views\argument

Code

public static function encodeValidatorId($id) {
  return str_replace(':', '---', $id);
}