public function WebformElementViewsAbstract::getElementViewsData in Webform Views Integration 8.5
Generate views data definition that corresponds to given 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
Return value
array Views data definition array that corresponds to the given webform element. The structure of this array should have the following structure:
- field: (array) Views data 'field' section to use for this webform element
- filter: (array) Views data 'filter' section to use for this webform element
- sort: (array) Views data 'sort' section to use for this webform element
- TODO: Do you need more here?
Overrides WebformElementViewsInterface::getElementViewsData
6 calls to WebformElementViewsAbstract::getElementViewsData()
- WebformCheckboxesViews::getElementViewsData in src/
WebformElementViews/ WebformCheckboxesViews.php - Generate views data definition that corresponds to given webform element.
- WebformCheckboxViews::getElementViewsData in src/
WebformElementViews/ WebformCheckboxViews.php - Generate views data definition that corresponds to given webform element.
- WebformComputed::getElementViewsData in src/
WebformElementViews/ WebformComputed.php - Generate views data definition that corresponds to given webform element.
- WebformDefaultViews::getElementViewsData in src/
WebformElementViews/ WebformDefaultViews.php - Generate views data definition that corresponds to given webform element.
- WebformElementViewsAbstract::getViewsData in src/
WebformElementViews/ WebformElementViewsAbstract.php - Generate views data related to a given element of a given webform.
5 methods override WebformElementViewsAbstract::getElementViewsData()
- WebformCheckboxesViews::getElementViewsData in src/
WebformElementViews/ WebformCheckboxesViews.php - Generate views data definition that corresponds to given webform element.
- WebformCheckboxViews::getElementViewsData in src/
WebformElementViews/ WebformCheckboxViews.php - Generate views data definition that corresponds to given webform element.
- WebformComputed::getElementViewsData in src/
WebformElementViews/ WebformComputed.php - Generate views data definition that corresponds to given webform element.
- WebformDefaultViews::getElementViewsData in src/
WebformElementViews/ WebformDefaultViews.php - Generate views data definition that corresponds to given webform element.
- WebformManagedFileViews::getElementViewsData in src/
WebformElementViews/ WebformManagedFileViews.php - Generate views data definition that corresponds to given webform element.
File
- src/
WebformElementViews/ WebformElementViewsAbstract.php, line 103
Class
- WebformElementViewsAbstract
- Abstract implementation of webform element views handler.
Namespace
Drupal\webform_views\WebformElementViewsCode
public function getElementViewsData(WebformElementInterface $element_plugin, array $element) {
return [
'field' => [
'id' => 'webform_submission_field',
'real field' => 'value',
'click sortable' => !$element_plugin
->isContainer($element) && !$element_plugin
->hasMultipleValues($element),
'multiple' => $element_plugin
->hasMultipleValues($element),
],
];
}