public function TextExtractorFormSettings::getExtractionPluginInformations in Search API attachments 8
Same name and namespace in other branches
- 9.0.x src/Form/TextExtractorFormSettings.php \Drupal\search_api_attachments\Form\TextExtractorFormSettings::getExtractionPluginInformations()
Get definition of Extraction plugins from their annotation definition.
Return value
array Array with 'labels' and 'descriptions' as keys containing plugin ids and their labels or descriptions.
File
- src/
Form/ TextExtractorFormSettings.php, line 199
Class
- TextExtractorFormSettings
- Configuration form.
Namespace
Drupal\search_api_attachments\FormCode
public function getExtractionPluginInformations() {
$options = [
'labels' => [],
'descriptions' => [],
];
foreach ($this
->getTextExtractorPluginManager()
->getDefinitions() as $plugin_id => $plugin_definition) {
$options['labels'][$plugin_id] = Html::escape($plugin_definition['label']);
$options['descriptions'][$plugin_id] = Html::escape($plugin_definition['description']);
}
return $options;
}