function Mapping::defineMapping
Same name in other branches
- 9 core/modules/views/src/Plugin/views/style/Mapping.php \Drupal\views\Plugin\views\style\Mapping::defineMapping()
- 8.9.x core/modules/views/src/Plugin/views/style/Mapping.php \Drupal\views\Plugin\views\style\Mapping::defineMapping()
- 10 core/modules/views/src/Plugin/views/style/Mapping.php \Drupal\views\Plugin\views\style\Mapping::defineMapping()
Builds the list of field mappings.
Return value
array An associative array, keyed by the field name, containing the following key-value pairs:
- #title: The human-readable label for this field.
- #default_value: The default value for this field. If not provided, an empty string will be used.
- #description: A description of this field.
- #required: Whether this field is required.
- #filter: (optional) A method on the plugin to filter field options.
- #toggle: (optional) If this select should be toggled by a checkbox.
3 calls to Mapping::defineMapping()
- Mapping::buildOptionsForm in core/
modules/ views/ src/ Plugin/ views/ style/ Mapping.php - Mapping::defineOptions in core/
modules/ views/ src/ Plugin/ views/ style/ Mapping.php - Mapping::render in core/
modules/ views/ src/ Plugin/ views/ style/ Mapping.php - Overrides Drupal\views\Plugin\views\style\StylePluginBase::render().
1 method overrides Mapping::defineMapping()
- MappingTest::defineMapping in core/
modules/ views/ tests/ modules/ views_test_data/ src/ Plugin/ views/ style/ MappingTest.php
File
-
core/
modules/ views/ src/ Plugin/ views/ style/ Mapping.php, line 42
Class
- Mapping
- Allows fields to be mapped to specific use cases.
Namespace
Drupal\views\Plugin\views\styleCode
protected abstract function defineMapping();
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.