Added another front page space for Yaffs info. Added roave security for composer.
[yaffs-website] / web / core / lib / Drupal / Core / Render / Element / Item.php
1 <?php
2
3 namespace Drupal\Core\Render\Element;
4
5 /**
6  * Provides a display-only form element with an optional title and description.
7  *
8  * Note: since this is a read-only field, setting the #required property will do
9  * nothing except theme the form element to look as if it were actually required
10  * (i.e. by placing a red star next to the #title).
11  *
12  * @FormElement("item")
13  */
14 class Item extends FormElement {
15
16   /**
17    * {@inheritdoc}
18    */
19   public function getInfo() {
20     return [
21       // Forms that show author fields to both anonymous and authenticated users
22       // need to dynamically switch between #type 'textfield' and #type 'item'
23       // to automatically take over the authenticated user's information.
24       // Therefore, we allow #type 'item' to receive input, which is internally
25       // assigned by Form API based on the #default_value or #value properties.
26       '#input' => TRUE,
27       '#markup' => '',
28       '#theme_wrappers' => ['form_element'],
29     ];
30   }
31
32 }