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

Breadcrumb

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

function Form::offsetGet

Gets the value of a field.

Parameters

string $name The field name:

Return value

FormField|FormField[]|FormField[][]

Throws

\InvalidArgumentException if the field does not exist

File

vendor/symfony/dom-crawler/Form.php, line 304

Class

Form
Form represents an HTML form.

Namespace

Symfony\Component\DomCrawler

Code

public function offsetGet(mixed $name) : FormField|array {
    return $this->fields
        ->get($name);
}
RSS feed
Powered by Drupal