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

Breadcrumb

  1. Drupal Core 11.1.x

Value.php

Same filename in this branch
  1. 11.1.x vendor/google/protobuf/src/Google/Protobuf/Value.php

Namespace

Drupal\Core\Render\Element

File

core/lib/Drupal/Core/Render/Element/Value.php

View source
<?php

namespace Drupal\Core\Render\Element;

use Drupal\Core\Render\Attribute\FormElement;

/**
 * Provides a form element for storage of internal information.
 *
 * Unlike \Drupal\Core\Render\Element\Hidden, this information is not sent to
 * the browser in a hidden form field, but only stored in the form array for use
 * in validation and submit processing.
 *
 * Properties:
 * - #value: The value of the form element that cannot be edited by the user.
 *
 * Usage Example:
 * @code
 * $form['entity_id'] = ['#type' => 'value', '#value' => $entity_id];
 * @endcode
 */
class Value extends FormElementBase {
    
    /**
     * {@inheritdoc}
     */
    public function getInfo() {
        return [
            '#input' => TRUE,
        ];
    }

}

Classes

Title Deprecated Summary
Value Provides a form element for storage of internal information.

API Navigation

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