Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / lib / Drupal / Core / Render / Element / Value.php
1 <?php
2
3 namespace Drupal\Core\Render\Element;
4
5 /**
6  * Provides a form element for storage of internal information.
7  *
8  * Unlike \Drupal\Core\Render\Element\Hidden, this information is not sent to
9  * the browser in a hidden form field, but only stored in the form array for use
10  * in validation and submit processing.
11  *
12  * Properties:
13  * - #value: The value of the form element that cannot be edited by the user.
14  *
15  * Usage Example:
16  * @code
17  * $form['entity_id'] = array('#type' => 'value', '#value' => $entity_id);
18  * @endcode
19  *
20  * @FormElement("value")
21  */
22 class Value extends FormElement {
23
24   /**
25    * {@inheritdoc}
26    */
27   public function getInfo() {
28     return [
29       '#input' => TRUE,
30     ];
31   }
32
33 }