You are here

protected function WebformAdminConfigBaseForm::convertIncludedToExcludedPluginIds in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Form/AdminConfig/WebformAdminConfigBaseForm.php \Drupal\webform\Form\AdminConfig\WebformAdminConfigBaseForm::convertIncludedToExcludedPluginIds()

Convert included ids returned from table select element to excluded ids.

Parameters

\Drupal\Component\Plugin\PluginManagerInterface $plugin_manager: A webform element, handler, or exporter plugin manager.

array $included_ids: An array of included_ids.

Return value

array An array of excluded ids.

See also

\Drupal\webform\Form\WebformAdminSettingsForm::buildExcludedPlugins

4 calls to WebformAdminConfigBaseForm::convertIncludedToExcludedPluginIds()
WebformAdminConfigElementsForm::submitForm in src/Form/AdminConfig/WebformAdminConfigElementsForm.php
Form submission handler.
WebformAdminConfigExportersForm::submitForm in src/Form/AdminConfig/WebformAdminConfigExportersForm.php
Form submission handler.
WebformAdminConfigHandlersForm::submitForm in src/Form/AdminConfig/WebformAdminConfigHandlersForm.php
Form submission handler.
WebformAdminConfigVariantsForm::submitForm in src/Form/AdminConfig/WebformAdminConfigVariantsForm.php
Form submission handler.

File

src/Form/AdminConfig/WebformAdminConfigBaseForm.php, line 203

Class

WebformAdminConfigBaseForm
Base webform admin settings form.

Namespace

Drupal\webform\Form\AdminConfig

Code

protected function convertIncludedToExcludedPluginIds(PluginManagerInterface $plugin_manager, array $included_ids) {
  $ids = [];
  $plugins = $this
    ->getPluginDefinitions($plugin_manager);
  foreach ($plugins as $id => $plugin) {
    $ids[$id] = $id;
  }
  $excluded_ids = array_diff($ids, array_filter($included_ids));
  ksort($excluded_ids);
  return $excluded_ids;
}