You are here

protected function SelectForm::getCardinality in Entity Browser 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/views/field/SelectForm.php \Drupal\entity_browser\Plugin\views\field\SelectForm::getCardinality()

Get cardinality from widget context.

Return value

int|null Returns cardinality from widget context.

1 call to SelectForm::getCardinality()
SelectForm::viewsForm in src/Plugin/views/field/SelectForm.php
Form constructor for the bulk form.

File

src/Plugin/views/field/SelectForm.php, line 210

Class

SelectForm
Defines a bulk operation form element that works with entity browser.

Namespace

Drupal\entity_browser\Plugin\views\field

Code

protected function getCardinality() {
  $widget_context = $this
    ->getWidgetContext();
  if (!empty($widget_context['cardinality'])) {
    return $widget_context['cardinality'];
  }
  return NULL;
}