Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
I was just wondering. Should the methods:
- buildConfigurationForm
- validateConfigurationForm
- submitConfigurationForm
be declared in the TextExtractorPluginInterface? As they are used in the search api attachments config form.
Comments
Comment #1
izus CreditAttribution: izus commentedactually, the config form is not important for our main goal : "extraction"
the real need, and the only thing a plugin should know is how to extract a file content, that's why our contract in TextExtractorPluginInterface only requires how to extract.
a plugin can theorically just implement PluginBase and TextExtractorPluginInterface (be known a a plugin and declare extract method only)
in the search_api processor, that's all what we need, and the only method of the plugin we use.
but in real life, we always need some configuration, that's why we had the idea to provide TextExtractorPluginBase, it's only a helper starter kit for plugins that will need configuration (quit all of them)
:)
Comment #2
GrimreaperOk, I forgot the pluginbase, sorry.
But, if I remember well in #2501309: Allow alternative tools to crawl attachments for text for the plugin pdftotext, I had to implement buildConfigurationForm otherwise I had an error.
Maybe there is something that should be fixed. I will test that if I can.
You can close the discussion if you want. Thanks.
Comment #3
izus CreditAttribution: izus commented