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

Breadcrumb

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

function FormFieldRegistry::walk

Transforms a PHP array in a list of fully qualified name / value.

1 call to FormFieldRegistry::walk()
FormFieldRegistry::all in vendor/symfony/dom-crawler/FormFieldRegistry.php
Returns the list of field with their value.

File

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

Class

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

Namespace

Symfony\Component\DomCrawler

Code

private function walk(array $array, ?string $base = '', array &$output = []) : array {
    foreach ($array as $k => $v) {
        $path = $base ? \sprintf('%s[%s]', $base, $k) : $k;
        if (\is_array($v)) {
            $this->walk($v, $path, $output);
        }
        else {
            $output[$path] = $v;
        }
    }
    return $output;
}

API Navigation

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