protected function SelectForm::getWidgetContext in Entity Browser 8.2
Same name and namespace in other branches
- 8 src/Plugin/views/field/SelectForm.php \Drupal\entity_browser\Plugin\views\field\SelectForm::getWidgetContext()
Get widget context from entity_browser.selection_storage service.
Return value
array Array of contextual information.
1 call to SelectForm::getWidgetContext()
- SelectForm::getCardinality in src/
Plugin/ views/ field/ SelectForm.php - Get cardinality from widget context.
File
- src/
Plugin/ views/ field/ SelectForm.php, line 192
Class
- SelectForm
- Defines a bulk operation form element that works with entity browser.
Namespace
Drupal\entity_browser\Plugin\views\fieldCode
protected function getWidgetContext() {
if ($this->currentRequest->query
->has('uuid')) {
$uuid = $this->currentRequest->query
->get('uuid');
if ($storage = $this->selectionStorage
->get($uuid)) {
if (isset($storage['widget_context'])) {
return $storage['widget_context'];
}
}
}
return [];
}