|
Tripal
|


Public Member Functions | |
| form (array $form, \Drupal\Core\Form\FormStateInterface &$form_state) | |
| formSubmit (array $form, \Drupal\Core\Form\FormStateInterface &$form_state) | |
| formValidate (array $form, \Drupal\Core\Form\FormStateInterface &$form_state) | |
| run (array $query) | |
| retrieve (array $query, int $limit=10, int $page=0) | |
| parse_xml (string $raw) | |
Defines an interface for tripal importer plugins.
| Drupal\tripal\TripalPubLibrary\Interfaces\TripalPubLibraryInterface::form | ( | array | $form, |
| \Drupal\Core\Form\FormStateInterface & | $form_state | ||
| ) |
Provides form elements to be added for specifying criteria for parsing.
These form elements are added after the file uploader section that is automaticaly provided by the TripalImporter.
| array | $form | The form array definition. |
| \Drupal\Core\Form\FormStateInterface | $form_state | The form state object. |
Implemented in Drupal\tripal\Plugin\TripalPubLibrary\TripalPubLibraryPubMed.
| Drupal\tripal\TripalPubLibrary\Interfaces\TripalPubLibraryInterface::formSubmit | ( | array | $form, |
| \Drupal\Core\Form\FormStateInterface & | $form_state | ||
| ) |
Handles submission of the form elements.
The form elements provided in the implementation of the form() function can be used for special submit if needed.
| array | $form | The form array definition. |
| \Drupal\Core\Form\FormStateInterface | $form_state | The form state object. |
Implemented in Drupal\tripal\Plugin\TripalPubLibrary\TripalPubLibraryPubMed.
| Drupal\tripal\TripalPubLibrary\Interfaces\TripalPubLibraryInterface::formValidate | ( | array | $form, |
| \Drupal\Core\Form\FormStateInterface & | $form_state | ||
| ) |
Handles validation of the form elements.
The form elements provided in the implementation of the form() function should be validated using this function.
| array | $form | The form array definition.* |
| \Drupal\Core\Form\FormStateInterface | $form_state | The form state object. |
Implemented in Drupal\tripal\Plugin\TripalPubLibrary\TripalPubLibraryPubMed.
| Drupal\tripal\TripalPubLibrary\Interfaces\TripalPubLibraryInterface::parse_xml | ( | string | $raw | ) |
Parses raw xml data and structures it
Receive the raw publication data and formats it into an array that PHP can utilize.
| string | $raw | Raw data in xml format |
Implemented in Drupal\tripal\Plugin\TripalPubLibrary\TripalPubLibraryPubMed.
| Drupal\tripal\TripalPubLibrary\Interfaces\TripalPubLibraryInterface::retrieve | ( | array | $query, |
| int | $limit = 10, |
||
| int | $page = 0 |
||
| ) |
Returns publications from remote publication library.
This function behaves like a pager where you specify the page number you want to return and the number of records you want prepared.
| array | $query | The criteria used by the parser to retrieve and parse results. |
| int | $limit | The number of publication records to return. |
| int | $page | The specific page of publication results to retrieve Page values start at 0. |
Implemented in Drupal\tripal\Plugin\TripalPubLibrary\TripalPubLibraryPubMed.
| Drupal\tripal\TripalPubLibrary\Interfaces\TripalPubLibraryInterface::run | ( | array | $query | ) |
Performs the import.
| array | $query | An associative array defining a publication query, specifying the database and query parameters for a particular publication repository. |
Implemented in Drupal\tripal\Plugin\TripalPubLibrary\TripalPubLibraryPubMed.