Added the Search API Synonym module to deal specifically with licence and license...
[yaffs-website] / web / modules / contrib / search_api_synonym / src / Import / ImportPluginInterface.php
1 <?php
2
3 namespace Drupal\search_api_synonym\Import;
4
5 use Drupal\Core\Plugin\PluginFormInterface;
6 use Drupal\Core\Form\FormStateInterface;
7 use Drupal\file\Entity\File;
8 use Drupal\Component\Plugin\ConfigurablePluginInterface;
9
10 /**
11  * Provides an interface for search api synonym import plugins.
12  *
13  * @ingroup plugin_api
14  */
15 interface ImportPluginInterface extends PluginFormInterface, ConfigurablePluginInterface {
16
17   /**
18    * Parse the import file.
19    *
20    * @param \Drupal\file\Entity\File $file
21    *   The temporary file object.
22    * @param array $settings
23    *   Array with plugin settings.
24    *
25    * @return string
26    *   The parsed file content.
27    */
28   public function parseFile(File $file, array $settings = []);
29
30   /**
31    * Plugin configuration form.
32    *
33    * @param array $form
34    *   Form array.
35    * @param \Drupal\Core\Form\FormStateInterface $form_state
36    *   The form state array.
37    *
38    * @return array
39    *   Form array.
40    */
41   public function buildConfigurationForm(array $form, FormStateInterface $form_state);
42
43   /**
44    * Validate configuration form.
45    *
46    * @param array $form
47    *   Form array.
48    * @param \Drupal\Core\Form\FormStateInterface $form_state
49    *   The form state array.
50    */
51   public function validateConfigurationForm(array &$form, FormStateInterface $form_state);
52
53   /**
54    * Get a list of allowed file extensions.
55    *
56    * @return array
57    *   List of allowed extensions.
58    */
59   public function allowedExtensions();
60
61 }