You are here

protected function OptionsLimitWebformHandler::getTableSelectElements in Webform 8.5

Same name and namespace in other branches
  1. 6.x modules/webform_options_limit/src/Plugin/WebformHandler/OptionsLimitWebformHandler.php \Drupal\webform_options_limit\Plugin\WebformHandler\OptionsLimitWebformHandler::getTableSelectElements()

Get table select elements.

Return value

array An array containing table select elements.

1 call to OptionsLimitWebformHandler::getTableSelectElements()
OptionsLimitWebformHandler::buildConfigurationForm in modules/webform_options_limit/src/Plugin/WebformHandler/OptionsLimitWebformHandler.php
Form constructor.

File

modules/webform_options_limit/src/Plugin/WebformHandler/OptionsLimitWebformHandler.php, line 1136

Class

OptionsLimitWebformHandler
Webform options and boolean (boolean) limit handler.

Namespace

Drupal\webform_options_limit\Plugin\WebformHandler

Code

protected function getTableSelectElements() {
  $webform = $this
    ->getWebform();
  $elements = $webform
    ->getElementsInitializedAndFlattened();
  $tableselect_elements = [];
  foreach ($elements as $element_key => $element) {
    $webform_element = $this->elementManager
      ->getElementInstance($element);
    if ($webform_element instanceof TableSelect) {
      $tableselect_elements[$element_key] = $element_key;
    }
  }
  return $tableselect_elements;
}