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

Breadcrumb

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

function FormFieldRegistry::remove

Removes a field based on the fully qualified name and its children from the registry.

File

vendor/symfony/dom-crawler/FormFieldRegistry.php, line 51

Class

FormFieldRegistry
This is an internal class that must not be used directly.

Namespace

Symfony\Component\DomCrawler

Code

public function remove(string $name) : void {
    $segments = $this->getSegments($name);
    $target =& $this->fields;
    while (\count($segments) > 1) {
        $path = array_shift($segments);
        if (!\is_array($target) || !\array_key_exists($path, $target)) {
            return;
        }
        $target =& $target[$path];
    }
    unset($target[array_shift($segments)]);
}

API Navigation

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