You are here

abstract protected function Mapping::defineMapping in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 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
Provide a form to edit options for this plugin.
Mapping::defineOptions in core/modules/views/src/Plugin/views/style/Mapping.php
Information about options for all kinds of purposes will be held here.
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
Builds the list of field mappings.

File

core/modules/views/src/Plugin/views/style/Mapping.php, line 47
Contains \Drupal\views\Plugin\views\style\Mapping.

Class

Mapping
Allows fields to be mapped to specific use cases.

Namespace

Drupal\views\Plugin\views\style

Code

protected abstract function defineMapping();