3 namespace Drupal\search_api_synonym\Import;
5 use Drupal\Core\Plugin\PluginFormInterface;
6 use Drupal\Core\Form\FormStateInterface;
7 use Drupal\file\Entity\File;
8 use Drupal\Component\Plugin\ConfigurablePluginInterface;
11 * Provides an interface for search api synonym import plugins.
15 interface ImportPluginInterface extends PluginFormInterface, ConfigurablePluginInterface {
18 * Parse the import file.
20 * @param \Drupal\file\Entity\File $file
21 * The temporary file object.
22 * @param array $settings
23 * Array with plugin settings.
26 * The parsed file content.
28 public function parseFile(File $file, array $settings = []);
31 * Plugin configuration form.
35 * @param \Drupal\Core\Form\FormStateInterface $form_state
36 * The form state array.
41 public function buildConfigurationForm(array $form, FormStateInterface $form_state);
44 * Validate configuration form.
48 * @param \Drupal\Core\Form\FormStateInterface $form_state
49 * The form state array.
51 public function validateConfigurationForm(array &$form, FormStateInterface $form_state);
54 * Get a list of allowed file extensions.
57 * List of allowed extensions.
59 public function allowedExtensions();