You are here

public function SubFormState::set in Authorization 8

Sets a value to an arbitrary property.

Parameters

string|array $property: Properties are often stored as multi-dimensional associative arrays. If $property is a string, it will use $storage[$property] = $value. If $property is an array, each element of the array will be used as a nested key. If $property = ['foo', 'bar'] it will use $storage['foo']['bar'] = $value.

mixed $value: The value to set.

Return value

$this

Overrides FormStateInterface::set

1 call to SubFormState::set()
SubFormState::setFormState in src/Form/SubFormState.php
Sets the value of the form state.

File

src/Form/SubFormState.php, line 222

Class

SubFormState
Represents the form state of a sub-form.

Namespace

Drupal\authorization\Form

Code

public function set($property, $value) {
  if (isset(self::$inheritedKeys[$property])) {
    $this->mainFormState
      ->set($property, $value);
  }
  else {
    $this->internalStorage[$property] = $value;
  }
  return $this;
}