protected function WebformCompositeViews::getCompositeViewsData in Webform Views Integration 8.5
Generate views data for a given composite key of a webform element.
Parameters
\Drupal\webform\Plugin\WebformElementInterface $element_plugin: Webform element plugin whose views data definition is requested
array $element: Webform element whose views data definition is requested
string $composite_key: Composite key for which views data to generate
Return value
array Views data definition array that corresponds to the given webform composite key
1 call to WebformCompositeViews::getCompositeViewsData()
- WebformCompositeViews::getViewsData in src/
WebformElementViews/ WebformCompositeViews.php - Generate views data related to a given element of a given webform.
File
- src/
WebformElementViews/ WebformCompositeViews.php, line 84
Class
- WebformCompositeViews
- Default webform views handler for composite webform elements.
Namespace
Drupal\webform_views\WebformElementViewsCode
protected function getCompositeViewsData(WebformElementInterface $element_plugin, array $element, $composite_key) {
$views_data = [];
$views_data['field'] = [
'id' => 'webform_submission_composite_field',
'real field' => $this->entityType
->getKey('id'),
'click sortable' => TRUE,
'multiple' => $element_plugin
->hasMultipleValues($element),
];
$views_data['sort'] = [
'id' => 'webform_submission_field_sort',
'real field' => 'value',
];
$views_data['filter'] = [
'id' => 'webform_submission_composite_field_filter',
'real field' => 'value',
];
return $views_data;
}