You are here

class SubFormState in Authorization 8

Represents the form state of a sub-form.

Hierarchy

Expanded class hierarchy of SubFormState

File

src/Form/SubFormState.php, line 17

Namespace

Drupal\authorization\Form
View source
class SubFormState implements FormStateInterface {

  /**
   * The keys which should be inherited as-is from the main form state.
   *
   * @var bool[]
   */
  protected static $inheritedKeys = [
    'build_info' => TRUE,
    'rebuild_info' => TRUE,
    'rebuild' => TRUE,
    'response' => TRUE,
    'redirect' => TRUE,
    'redirect_route' => TRUE,
    'no_redirect' => TRUE,
    'method' => TRUE,
    'cache' => TRUE,
    'no_cache' => TRUE,
    'triggering_element' => TRUE,
  ];

  /**
   * The form state of the main form.
   *
   * @var \Drupal\Core\Form\FormStateInterface
   */
  protected $mainFormState;

  /**
   * The keys that lead to the desired sub-form in the main form.
   *
   * @var string[]
   */
  protected $subKeys;

  /**
   * Internal storage for the sub-state, writing into the main form state.
   *
   * @var array
   */
  protected $internalStorage;

  /**
   * The values of the sub-form.
   *
   * @var array
   */
  protected $values;

  /**
   * The input of the sub-form.
   *
   * @var array
   */
  protected $input;

  /**
   * Constructs a SubFormState object.
   *
   * @param \Drupal\Core\Form\FormStateInterface $main_form_state
   *   The state of the main form.
   * @param string[] $sub_keys
   *   The keys that lead to the desired sub-form in the main form.
   */
  public function __construct(FormStateInterface $main_form_state, array $sub_keys) {
    $this->mainFormState = $main_form_state;
    $this->subKeys = $sub_keys;
    $sub_state =& $main_form_state
      ->get('sub_states');
    if (!isset($sub_state)) {
      $sub_state = [];
    }
    $this->internalStorage =& $this
      ->applySubKeys($sub_state);
    if (!isset($this->internalStorage)) {
      $this->internalStorage = [];
    }
    $this->values =& $this
      ->applySubKeys($main_form_state
      ->getValues());
    if (!is_array($this->values)) {
      $this->values = [];
    }
    $this->input =& $this
      ->applySubKeys($main_form_state
      ->getUserInput());
    if (!is_array($this->input)) {
      $this->input = [];
    }
  }

  /**
   * Applies the sub-form's array keys to the given original array.
   *
   * @param array $original
   *   The original array, belonging to the main form.
   *
   * @return array|null
   *   The corresponding array for the sub form, as a reference.
   */
  protected function &applySubKeys(array &$original) : ?array {
    return NestedArray::getValue($original, $this->subKeys);
  }

  /**
   * {@inheritdoc}
   */
  public function &getCompleteForm() : array {
    return $this
      ->applySubKeys($this->mainFormState
      ->getCompleteForm());
  }

  /**
   * {@inheritdoc}
   */
  public function setCompleteForm(array &$complete_form) {
    $sub_form =& $this
      ->applySubKeys($this->mainFormState
      ->getCompleteForm());
    $sub_form = $complete_form;
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function loadInclude($module, $type, $name = NULL) {
    return $this->mainFormState
      ->loadInclude($module, $type, $name);
  }

  /**
   * {@inheritdoc}
   */
  public function getCacheableArray() : array {
    return [];
  }

  /**
   * {@inheritdoc}
   */
  public function setFormState(array $form_state_additions) {
    foreach ($form_state_additions as $key => $value) {
      $this
        ->set($key, $value);
    }
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function setResponse(Response $response) {
    $this->mainFormState
      ->setResponse($response);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function getResponse() : ?Response {
    return $this->mainFormState
      ->getResponse();
  }

  /**
   * {@inheritdoc}
   */
  public function setRedirect($route_name, array $route_parameters = [], array $options = []) {
    $this->mainFormState
      ->setRedirect($route_name, $route_parameters, $options);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function setRedirectUrl(Url $url) {
    $this->mainFormState
      ->setRedirectUrl($url);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function getRedirect() {
    return $this->mainFormState
      ->getRedirect();
  }

  /**
   * {@inheritdoc}
   */
  public function setStorage(array $storage) {
    $this->internalStorage = $storage;
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function &getStorage() {
    return $this->internalStorage;
  }

  /**
   * {@inheritdoc}
   */
  public function &get($property) {
    if (isset(self::$inheritedKeys[$property])) {
      return $this->mainFormState
        ->get($property);
    }
    $value =& NestedArray::getValue($this->internalStorage, (array) $property);
    return $value;
  }

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

  /**
   * {@inheritdoc}
   */
  public function has($property) {
    return isset(self::$inheritedKeys[$property]) || array_key_exists($property, $this->internalStorage);
  }

  /**
   * {@inheritdoc}
   */
  public function setBuildInfo(array $build_info) {
    $this->mainFormState
      ->setBuildInfo($build_info);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function getBuildInfo() {
    return $this->mainFormState
      ->getBuildInfo();
  }

  /**
   * {@inheritdoc}
   */
  public function addBuildInfo($property, $value) {
    $this->mainFormState
      ->addBuildInfo($property, $value);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function &getUserInput() {
    $user_input =& $this->mainFormState
      ->getUserInput();
    return $this
      ->applySubKeys($user_input);
  }

  /**
   * {@inheritdoc}
   */
  public function setUserInput(array $user_input) {
    $old =& $this
      ->getUserInput();
    $old = $user_input;
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function &getValues() {
    return $this->values;
  }

  /**
   * {@inheritdoc}
   */
  public function &getValue($key, $default = NULL) {
    if ($this
      ->hasValue($key)) {
      return $this->values[$key];
    }
  }

  /**
   * {@inheritdoc}
   */
  public function setValues(array $values) {
    $this->values = $values;
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function setValue($key, $value) {
    $this->values[$key] = $value;
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function unsetValue($key) {
    unset($this->values[$key]);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function hasValue($key) {
    if (isset($this->values[$key])) {
      return TRUE;
    }
    return FALSE;
  }

  /**
   * {@inheritdoc}
   */
  public function isValueEmpty($key) {
    if (empty($this->values[$key])) {
      return TRUE;
    }
    return FALSE;
  }

  /**
   * {@inheritdoc}
   */
  public function setValueForElement(array $element, $value) {
    $this->mainFormState
      ->setValueForElement($element, $value);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public static function hasAnyErrors() {
    return FormState::hasAnyErrors();
  }

  /**
   * {@inheritdoc}
   */
  public function setErrorByName($name, $message = '') {
    $this->mainFormState
      ->setErrorByName(implode('][', $this->subKeys) . '][' . $name, $message);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function setError(array &$element, $message = '') {
    $this->mainFormState
      ->setError($element, $message);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function clearErrors() {
    $this->mainFormState
      ->clearErrors();
  }

  /**
   * {@inheritdoc}
   */
  public function getErrors() {
    return $this->mainFormState
      ->getErrors();
  }

  /**
   * {@inheritdoc}
   */
  public function getError(array $element) {
    return $this->mainFormState
      ->getError($element);
  }

  /**
   * {@inheritdoc}
   */
  public function setRebuild($rebuild = TRUE) {
    $this->mainFormState
      ->setRebuild($rebuild);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function isRebuilding() {
    return $this->mainFormState
      ->isRebuilding();
  }

  /**
   * {@inheritdoc}
   */
  public function setInvalidToken($invalid_token) {
    $this->mainFormState
      ->setInvalidToken($invalid_token);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function hasInvalidToken() {
    return $this->mainFormState
      ->hasInvalidToken();
  }

  /**
   * {@inheritdoc}
   */
  public function prepareCallback($callback) {
    return $this->mainFormState
      ->prepareCallback($callback);
  }

  /**
   * {@inheritdoc}
   */
  public function getFormObject() {
    return $this->mainFormState
      ->getFormObject();
  }

  /**
   * {@inheritdoc}
   */
  public function setFormObject(FormInterface $form_object) {
    $this->mainFormState
      ->setFormObject($form_object);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function setAlwaysProcess($always_process = TRUE) {
    $this->mainFormState
      ->setAlwaysProcess($always_process);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function getAlwaysProcess() {
    return $this->mainFormState
      ->getAlwaysProcess();
  }

  /**
   * {@inheritdoc}
   */
  public function setButtons(array $buttons) {
    $this->mainFormState
      ->setButtons($buttons);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function getButtons() {
    return $this->mainFormState
      ->getButtons();
  }

  /**
   * {@inheritdoc}
   */
  public function setCached($cache = TRUE) {
    $this->mainFormState
      ->setCached($cache);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function isCached() {
    return $this->mainFormState
      ->isCached();
  }

  /**
   * {@inheritdoc}
   */
  public function disableCache() {
    $this->mainFormState
      ->disableCache();
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function setExecuted() {
    $this->mainFormState
      ->setExecuted();
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function isExecuted() {
    return $this->mainFormState
      ->isExecuted();
  }

  /**
   * {@inheritdoc}
   */
  public function setGroups(array $groups) {

    // @todo What are groups? Is this the way to handle them in a sub-form?
    $this->mainFormState
      ->setGroups($groups);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function &getGroups() {
    return $this->mainFormState
      ->getGroups();
  }

  /**
   * {@inheritdoc}
   */
  public function setHasFileElement($has_file_element = TRUE) {
    $this->mainFormState
      ->setHasFileElement($has_file_element);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function hasFileElement() {
    return $this->mainFormState
      ->hasFileElement();
  }

  /**
   * {@inheritdoc}
   */
  public function setLimitValidationErrors($limit_validation_errors) {
    $add_subkeys = function (array $path) {
      return array_merge($this->subKeys, $path);
    };
    $limit_validation_errors = array_map($add_subkeys, $limit_validation_errors);
    $this->mainFormState
      ->setLimitValidationErrors($limit_validation_errors);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function getLimitValidationErrors() {
    $limit_validation_errors = $this->mainFormState
      ->getLimitValidationErrors();
    if (is_null($limit_validation_errors)) {
      return NULL;
    }
    $return = [];
    $sub_keys_count = count($this->subKeys);
    foreach ($limit_validation_errors as $path) {
      if (array_slice($path, 0, $sub_keys_count) == $sub_keys_count) {

        // If the whole sub-form is included, it is the same (for the sub-form)
        // as if there was no limitation at all.
        if (count($path) == $sub_keys_count) {
          return NULL;
        }
        $return[] = $path;
      }
    }
    return $return;
  }

  /**
   * {@inheritdoc}
   */
  public function setMethod($method) {
    $this->mainFormState
      ->setMethod($method);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function setRequestMethod($method) {
    $this->mainFormState
      ->setRequestMethod($method);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function isMethodType($method_type) : bool {
    return $this->mainFormState
      ->isMethodType($method_type);
  }

  /**
   * {@inheritdoc}
   */
  public function setValidationEnforced($must_validate = TRUE) {
    $this->mainFormState
      ->setValidationEnforced($must_validate);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function isValidationEnforced() : bool {
    return $this->mainFormState
      ->isValidationEnforced();
  }

  /**
   * {@inheritdoc}
   */
  public function disableRedirect($no_redirect = TRUE) {
    $this->mainFormState
      ->disableRedirect($no_redirect);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function isRedirectDisabled() : bool {
    return $this->mainFormState
      ->isRedirectDisabled();
  }

  /**
   * {@inheritdoc}
   */
  public function setProcessInput($process_input = TRUE) {
    $this->mainFormState
      ->setProcessInput($process_input);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function isProcessingInput() {
    return $this->mainFormState
      ->isProcessingInput();
  }

  /**
   * {@inheritdoc}
   */
  public function setProgrammed($programmed = TRUE) {
    $this->mainFormState
      ->setProgrammed($programmed);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function isProgrammed() {
    return $this->mainFormState
      ->isProgrammed();
  }

  /**
   * {@inheritdoc}
   */
  public function setProgrammedBypassAccessCheck($programmed_bypass_access_check = TRUE) {
    $this->mainFormState
      ->setProgrammedBypassAccessCheck($programmed_bypass_access_check);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function isBypassingProgrammedAccessChecks() {
    return $this->mainFormState
      ->isBypassingProgrammedAccessChecks();
  }

  /**
   * {@inheritdoc}
   */
  public function setRebuildInfo(array $rebuild_info) {
    $this->mainFormState
      ->setRebuildInfo($rebuild_info);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function getRebuildInfo() : array {
    return $this->mainFormState
      ->getRebuildInfo();
  }

  /**
   * {@inheritdoc}
   */
  public function addRebuildInfo($property, $value) {
    $this->mainFormState
      ->addRebuildInfo($property, $value);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function setSubmitHandlers(array $submit_handlers) {
    $this->mainFormState
      ->setSubmitHandlers($submit_handlers);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function getSubmitHandlers() : array {
    return $this->mainFormState
      ->getSubmitHandlers();
  }

  /**
   * {@inheritdoc}
   */
  public function setSubmitted() {
    $this->mainFormState
      ->setSubmitted();
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function isSubmitted() : bool {
    return $this->mainFormState
      ->isSubmitted();
  }

  /**
   * {@inheritdoc}
   */
  public function setTemporary(array $temporary) {
    $this->mainFormState
      ->setTemporary($temporary);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function getTemporary() : array {
    return $this->mainFormState
      ->getTemporary();
  }

  /**
   * {@inheritdoc}
   */
  public function &getTemporaryValue($key) {
    return $this->mainFormState
      ->getTemporaryValue($key);
  }

  /**
   * {@inheritdoc}
   */
  public function setTemporaryValue($key, $value) {
    $this->mainFormState
      ->setTemporaryValue($key, $value);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function hasTemporaryValue($key) {
    return $this->mainFormState
      ->getTemporaryValue($key);
  }

  /**
   * {@inheritdoc}
   */
  public function setTriggeringElement($triggering_element) {
    $this->mainFormState
      ->setTriggeringElement($triggering_element);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function &getTriggeringElement() {
    return $this->mainFormState
      ->getTriggeringElement();
  }

  /**
   * {@inheritdoc}
   */
  public function setValidateHandlers(array $validate_handlers) {
    $this->mainFormState
      ->setValidateHandlers($validate_handlers);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function getValidateHandlers() : array {
    return $this->mainFormState
      ->getValidateHandlers();
  }

  /**
   * {@inheritdoc}
   */
  public function setValidationComplete($validation_complete = TRUE) {
    $this->mainFormState
      ->setValidationComplete($validation_complete);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function isValidationComplete() : bool {
    return $this->mainFormState
      ->isValidationComplete();
  }

  /**
   * {@inheritdoc}
   */
  public function getCleanValueKeys() : array {
    return $this->mainFormState
      ->getCleanValueKeys();
  }

  /**
   * {@inheritdoc}
   */
  public function setCleanValueKeys(array $keys) {
    $this->mainFormState
      ->setCleanValueKeys($keys);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function addCleanValueKey($key) {
    $this->mainFormState
      ->addCleanValueKey($key);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function cleanValues() {
    $this->mainFormState
      ->cleanValues();
    return $this;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
SubFormState::$inheritedKeys protected static property The keys which should be inherited as-is from the main form state.
SubFormState::$input protected property The input of the sub-form.
SubFormState::$internalStorage protected property Internal storage for the sub-state, writing into the main form state.
SubFormState::$mainFormState protected property The form state of the main form.
SubFormState::$subKeys protected property The keys that lead to the desired sub-form in the main form.
SubFormState::$values protected property The values of the sub-form.
SubFormState::addBuildInfo public function Adds a value to the build info. Overrides FormStateInterface::addBuildInfo
SubFormState::addCleanValueKey public function Adds a key to the array of form values that will be cleaned. Overrides FormStateInterface::addCleanValueKey
SubFormState::addRebuildInfo public function Adds a value to the rebuild info. Overrides FormStateInterface::addRebuildInfo
SubFormState::applySubKeys protected function Applies the sub-form's array keys to the given original array.
SubFormState::cleanValues public function Removes internal Form API elements and buttons from submitted form values. Overrides FormStateInterface::cleanValues
SubFormState::clearErrors public function Clears all errors against all form elements made by self::setErrorByName(). Overrides FormStateInterface::clearErrors
SubFormState::disableCache public function Prevents the form from being cached. Overrides FormStateInterface::disableCache
SubFormState::disableRedirect public function Prevents the form from redirecting. Overrides FormStateInterface::disableRedirect
SubFormState::get public function Gets any arbitrary property. Overrides FormStateInterface::get
SubFormState::getAlwaysProcess public function Determines if this form should always be processed. Overrides FormStateInterface::getAlwaysProcess
SubFormState::getBuildInfo public function Returns the build info for the form. Overrides FormStateInterface::getBuildInfo
SubFormState::getButtons public function Returns the submit and button elements for the form. Overrides FormStateInterface::getButtons
SubFormState::getCacheableArray public function Returns an array representation of the cacheable portion of the form state. Overrides FormStateInterface::getCacheableArray
SubFormState::getCleanValueKeys public function Gets the keys of the form values that will be cleaned. Overrides FormStateInterface::getCleanValueKeys
SubFormState::getCompleteForm public function Returns a reference to the complete form array. Overrides FormStateInterface::getCompleteForm
SubFormState::getError public function Returns the error message filed against the given form element. Overrides FormStateInterface::getError
SubFormState::getErrors public function Returns an associative array of all errors. Overrides FormStateInterface::getErrors
SubFormState::getFormObject public function Returns the form object that is responsible for building this form. Overrides FormStateInterface::getFormObject
SubFormState::getGroups public function Returns references to details elements to render them within vertical tabs. Overrides FormStateInterface::getGroups
SubFormState::getLimitValidationErrors public function Retrieves the limited validation error sections. Overrides FormStateInterface::getLimitValidationErrors
SubFormState::getRebuildInfo public function Gets the rebuild info. Overrides FormStateInterface::getRebuildInfo
SubFormState::getRedirect public function Gets the value to use for redirecting after the form has been executed. Overrides FormStateInterface::getRedirect
SubFormState::getResponse public function Gets a response for this form. Overrides FormStateInterface::getResponse
SubFormState::getStorage public function Returns the entire set of arbitrary data. Overrides FormStateInterface::getStorage
SubFormState::getSubmitHandlers public function Gets the submit handlers. Overrides FormStateInterface::getSubmitHandlers
SubFormState::getTemporary public function Gets temporary data. Overrides FormStateInterface::getTemporary
SubFormState::getTemporaryValue public function Gets an arbitrary value from temporary storage. Overrides FormStateInterface::getTemporaryValue
SubFormState::getTriggeringElement public function Gets the form element that triggered submission. Overrides FormStateInterface::getTriggeringElement
SubFormState::getUserInput public function Returns the form values as they were submitted by the user. Overrides FormStateInterface::getUserInput
SubFormState::getValidateHandlers public function Gets the validate handlers. Overrides FormStateInterface::getValidateHandlers
SubFormState::getValue public function Returns the submitted form value for a specific key. Overrides FormStateInterface::getValue
SubFormState::getValues public function Returns the submitted and sanitized form values. Overrides FormStateInterface::getValues
SubFormState::has public function Determines if an arbitrary property is present. Overrides FormStateInterface::has
SubFormState::hasAnyErrors public static function Determines if any forms have any errors. Overrides FormStateInterface::hasAnyErrors
SubFormState::hasFileElement public function Returns whether this form has a file element. Overrides FormStateInterface::hasFileElement
SubFormState::hasInvalidToken public function Determines if the form has an invalid token. Overrides FormStateInterface::hasInvalidToken
SubFormState::hasTemporaryValue public function Determines if a temporary value is present. Overrides FormStateInterface::hasTemporaryValue
SubFormState::hasValue public function Determines if a specific key is present in the submitted form values. Overrides FormStateInterface::hasValue
SubFormState::isBypassingProgrammedAccessChecks public function Determines if this form submission should bypass #access. Overrides FormStateInterface::isBypassingProgrammedAccessChecks
SubFormState::isCached public function Determines if the form should be cached. Overrides FormStateInterface::isCached
SubFormState::isExecuted public function Determines if the form was submitted and has been processed and executed. Overrides FormStateInterface::isExecuted
SubFormState::isMethodType public function Returns the HTTP form method. Overrides FormStateInterface::isMethodType
SubFormState::isProcessingInput public function Determines if the form input will be processed. Overrides FormStateInterface::isProcessingInput
SubFormState::isProgrammed public function Returns if this form was submitted programmatically. Overrides FormStateInterface::isProgrammed
SubFormState::isRebuilding public function Determines if the form should be rebuilt after processing. Overrides FormStateInterface::isRebuilding
SubFormState::isRedirectDisabled public function Determines if redirecting has been prevented. Overrides FormStateInterface::isRedirectDisabled
SubFormState::isSubmitted public function Determines if the form has been submitted. Overrides FormStateInterface::isSubmitted
SubFormState::isValidationComplete public function Determines if validation has been completed. Overrides FormStateInterface::isValidationComplete
SubFormState::isValidationEnforced public function Checks if validation is enforced. Overrides FormStateInterface::isValidationEnforced
SubFormState::isValueEmpty public function Determines if a specific key has a value in the submitted form values. Overrides FormStateInterface::isValueEmpty
SubFormState::loadInclude public function Ensures an include file is loaded whenever the form is processed. Overrides FormStateInterface::loadInclude
SubFormState::prepareCallback public function Converts support notations for a form callback to a valid callable. Overrides FormStateInterface::prepareCallback
SubFormState::set public function Sets a value to an arbitrary property. Overrides FormStateInterface::set
SubFormState::setAlwaysProcess public function Sets this form to always be processed. Overrides FormStateInterface::setAlwaysProcess
SubFormState::setBuildInfo public function Sets the build info for the form. Overrides FormStateInterface::setBuildInfo
SubFormState::setButtons public function Stores the submit and button elements for the form. Overrides FormStateInterface::setButtons
SubFormState::setCached public function Sets this form to be cached. Overrides FormStateInterface::setCached
SubFormState::setCleanValueKeys public function Sets the keys of the form values that will be cleaned. Overrides FormStateInterface::setCleanValueKeys
SubFormState::setCompleteForm public function Stores the complete form array. Overrides FormStateInterface::setCompleteForm
SubFormState::setError public function Flags an element as having an error. Overrides FormStateInterface::setError
SubFormState::setErrorByName public function Files an error against a form element. Overrides FormStateInterface::setErrorByName
SubFormState::setExecuted public function Sets that the form was submitted and has been processed and executed. Overrides FormStateInterface::setExecuted
SubFormState::setFormObject public function Sets the form object that is responsible for building this form. Overrides FormStateInterface::setFormObject
SubFormState::setFormState public function Sets the value of the form state. Overrides FormStateInterface::setFormState
SubFormState::setGroups public function Sets references to details elements to render them within vertical tabs. Overrides FormStateInterface::setGroups
SubFormState::setHasFileElement public function Sets that this form has a file element. Overrides FormStateInterface::setHasFileElement
SubFormState::setInvalidToken public function Flags the form state as having or not an invalid token. Overrides FormStateInterface::setInvalidToken
SubFormState::setLimitValidationErrors public function Sets the limited validation error sections. Overrides FormStateInterface::setLimitValidationErrors
SubFormState::setMethod public function Sets the HTTP method to use for the form's submission. Overrides FormStateInterface::setMethod
SubFormState::setProcessInput public function Sets that the form should process input. Overrides FormStateInterface::setProcessInput
SubFormState::setProgrammed public function Sets that this form was submitted programmatically. Overrides FormStateInterface::setProgrammed
SubFormState::setProgrammedBypassAccessCheck public function Sets if this form submission should bypass #access. Overrides FormStateInterface::setProgrammedBypassAccessCheck
SubFormState::setRebuild public function Sets the form to be rebuilt after processing. Overrides FormStateInterface::setRebuild
SubFormState::setRebuildInfo public function Sets the rebuild info. Overrides FormStateInterface::setRebuildInfo
SubFormState::setRedirect public function Sets the redirect for the form. Overrides FormStateInterface::setRedirect
SubFormState::setRedirectUrl public function Sets the redirect URL for the form. Overrides FormStateInterface::setRedirectUrl
SubFormState::setRequestMethod public function Sets the HTTP method used by the request that is building the form. Overrides FormStateInterface::setRequestMethod
SubFormState::setResponse public function Sets a response for this form. Overrides FormStateInterface::setResponse
SubFormState::setStorage public function Sets the entire set of arbitrary data. Overrides FormStateInterface::setStorage
SubFormState::setSubmitHandlers public function Sets the submit handlers. Overrides FormStateInterface::setSubmitHandlers
SubFormState::setSubmitted public function Sets that the form has been submitted. Overrides FormStateInterface::setSubmitted
SubFormState::setTemporary public function Sets temporary data. Overrides FormStateInterface::setTemporary
SubFormState::setTemporaryValue public function Sets an arbitrary value in temporary storage. Overrides FormStateInterface::setTemporaryValue
SubFormState::setTriggeringElement public function Sets the form element that triggered submission. Overrides FormStateInterface::setTriggeringElement
SubFormState::setUserInput public function Sets the form values as though they were submitted by a user. Overrides FormStateInterface::setUserInput
SubFormState::setValidateHandlers public function Sets the validate handlers. Overrides FormStateInterface::setValidateHandlers
SubFormState::setValidationComplete public function Sets that validation has been completed. Overrides FormStateInterface::setValidationComplete
SubFormState::setValidationEnforced public function Enforces that validation is run. Overrides FormStateInterface::setValidationEnforced
SubFormState::setValue public function Sets the submitted form value for a specific key. Overrides FormStateInterface::setValue
SubFormState::setValueForElement public function Changes submitted form values during form validation. Overrides FormStateInterface::setValueForElement
SubFormState::setValues public function Sets the submitted form values. Overrides FormStateInterface::setValues
SubFormState::unsetValue public function Removes a specific key from the submitted form values. Overrides FormStateInterface::unsetValue
SubFormState::__construct public function Constructs a SubFormState object.