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

Breadcrumb

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

function ValidatorBuilder::addXmlMappings

Adds a list of XML constraint mapping files to the validator.

Parameters

string[] $paths The paths to the mapping files:

Return value

$this

File

vendor/symfony/validator/ValidatorBuilder.php, line 104

Class

ValidatorBuilder
@author Bernhard Schussek <bschussek@gmail.com>

Namespace

Symfony\Component\Validator

Code

public function addXmlMappings(array $paths) : static {
    if (null !== $this->metadataFactory) {
        throw new ValidatorException('You cannot add custom mappings after setting a custom metadata factory. Configure your metadata factory instead.');
    }
    $this->xmlMappings = array_merge($this->xmlMappings, $paths);
    return $this;
}

API Navigation

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