class Value in Zircon Profile 8
Same name in this branch
- 8 core/lib/Drupal/Core/Render/Element/Value.php \Drupal\Core\Render\Element\Value
- 8 vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Value.php \Doctrine\Common\Collections\Expr\Value
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Render/Element/Value.php \Drupal\Core\Render\Element\Value
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:
$form['entity_id'] = array(
'#type' => 'value',
'#value' => $entity_id,
);
Plugin annotation
@FormElement("value");
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, StringTranslationTrait
- class \Drupal\Core\Render\Element\RenderElement implements ElementInterface
- class \Drupal\Core\Render\Element\FormElement implements FormElementInterface
- class \Drupal\Core\Render\Element\Value
- class \Drupal\Core\Render\Element\FormElement implements FormElementInterface
- class \Drupal\Core\Render\Element\RenderElement implements ElementInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, StringTranslationTrait
Expanded class hierarchy of Value
23 string references to 'Value'
- BatchTestChainedForm::buildForm in core/
modules/ system/ tests/ modules/ batch_test/ src/ Form/ BatchTestChainedForm.php - Form constructor.
- config_events_test.schema.yml in core/
modules/ config/ tests/ config_events_test/ config/ schema/ config_events_test.schema.yml - core/modules/config/tests/config_events_test/config/schema/config_events_test.schema.yml
- config_test.schema.yml in core/
modules/ config/ tests/ config_test/ config/ schema/ config_test.schema.yml - core/modules/config/tests/config_test/config/schema/config_test.schema.yml
- core.data_types.schema.yml in core/
config/ schema/ core.data_types.schema.yml - core/config/schema/core.data_types.schema.yml
- core.entity.schema.yml in core/
config/ schema/ core.entity.schema.yml - core/config/schema/core.entity.schema.yml
55 #type uses of Value
- ActionFormBase::form in core/
modules/ action/ src/ ActionFormBase.php - Gets the actual form array to be built.
- BlockBase::buildConfigurationForm in core/
lib/ Drupal/ Core/ Block/ BlockBase.php - Creates a generic configuration form for all block types. Individual block plugins can add elements to this form by overriding BlockBase::blockForm(). Most block plugins should not override this method unless they need to alter the generic form elements.
- BlockForm::form in core/
modules/ block/ src/ BlockForm.php - Gets the actual form array to be built.
- BlockInterfaceTest::testBlockInterface in core/
modules/ block/ src/ Tests/ BlockInterfaceTest.php - Test configuration and subsequent form() and build() method calls.
- BookAdminEditForm::bookAdminTable in core/
modules/ book/ src/ Form/ BookAdminEditForm.php - Builds the table portion of the form for the book administration page.
File
- core/
lib/ Drupal/ Core/ Render/ Element/ Value.php, line 27 - Contains \Drupal\Core\Render\Element\Value.
Namespace
Drupal\Core\Render\ElementView source
class Value extends FormElement {
/**
* {@inheritdoc}
*/
public function getInfo() {
return array(
'#input' => TRUE,
);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DependencySerializationTrait:: |
protected | property | An array of service IDs keyed by property name used for serialization. | |
DependencySerializationTrait:: |
public | function | 1 | |
DependencySerializationTrait:: |
public | function | 2 | |
FormElement:: |
public static | function | Adds autocomplete functionality to elements. | |
FormElement:: |
public static | function | #process callback for #pattern form element property. | |
FormElement:: |
public static | function | #element_validate callback for #pattern form element property. | |
FormElement:: |
public static | function |
Determines how user input is mapped to an element's #value property. Overrides FormElementInterface:: |
15 |
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 2 |
PluginBase:: |
protected | property | The plugin implementation definition. | |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
PluginBase:: |
public | function |
Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function | Constructs a Drupal\Component\Plugin\PluginBase object. | 69 |
RenderElement:: |
public static | function | Adds Ajax information about an element to communicate with JavaScript. | |
RenderElement:: |
public static | function | Adds members of this group as actual elements for rendering. | |
RenderElement:: |
public static | function | Form element processing handler for the #ajax form property. | |
RenderElement:: |
public static | function | Arranges elements into groups. | |
RenderElement:: |
public static | function |
Sets a form element's class attribute. Overrides ElementInterface:: |
|
StringTranslationTrait:: |
protected | property | The string translation service. | |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. | |
Value:: |
public | function |
Returns the element properties for this element. Overrides ElementInterface:: |