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

izus’s picture

actually, 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)

:)

Grimreaper’s picture

Ok, 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.

izus’s picture

Status: Active » Closed (works as designed)