Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ArgumentPluginBase.php

function 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()

3 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.
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\argument

Code

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal