Same name and namespace in other branches
  1. 8.9.x core/modules/views/src/Plugin/views/style/Mapping.php \Drupal\views\Plugin\views\style\Mapping::defineMapping()
  2. 9 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().

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\style

Code

protected abstract function defineMapping();