You are here

abstract protected function Mapping::defineMapping in Views (for Drupal 7) 8.3

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 lib/Drupal/views/Plugin/views/style/Mapping.php
Overrides Drupal\views\Plugin\views\style\StylePluginBase::buildOptionsForm().
Mapping::defineOptions in lib/Drupal/views/Plugin/views/style/Mapping.php
Overrides Drupal\views\Plugin\views\style\StylePluginBase::defineOptions().
Mapping::render in lib/Drupal/views/Plugin/views/style/Mapping.php
Overrides Drupal\views\Plugin\views\style\StylePluginBase::render().
1 method overrides Mapping::defineMapping()
MappingTest::defineMapping in tests/views_test_data/lib/Drupal/views_test_data/Plugin/views/style/MappingTest.php
Overrides Drupal\views\Plugin\views\style\Mapping::defineMapping().

File

lib/Drupal/views/Plugin/views/style/Mapping.php, line 45
Definition of 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();