Tripal
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Drupal\tripal\TripalPubParser\Interfaces\TripalPubParserInterface Interface Reference
Inheritance diagram for Drupal\tripal\TripalPubParser\Interfaces\TripalPubParserInterface:
Inheritance graph
[legend]
Collaboration diagram for Drupal\tripal\TripalPubParser\Interfaces\TripalPubParserInterface:
Collaboration graph
[legend]

Public Member Functions

 form ($form, &$form_state)
 
 formSubmit ($form, &$form_state)
 
 formValidate ($form, &$form_state)
 
 run (array $criteria)
 

Detailed Description

Defines an interface for tripal importer plugins.

Member Function Documentation

◆ form()

Drupal\tripal\TripalPubParser\Interfaces\TripalPubParserInterface::form (   $form,
$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.

Parameters
array$formThe form array definition.
\Drupal\Core\Form\FormStateInterface$form_stateThe form state object.
Returns
array A new form array definition.

◆ formSubmit()

Drupal\tripal\TripalPubParser\Interfaces\TripalPubParserInterface::formSubmit (   $form,
$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.

Parameters
array$formThe form array definition.
\Drupal\Core\Form\FormStateInterface$form_stateThe form state object.

◆ formValidate()

Drupal\tripal\TripalPubParser\Interfaces\TripalPubParserInterface::formValidate (   $form,
$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.

Parameters
array$formThe form array definition.*
\Drupal\Core\Form\FormStateInterface$form_stateThe form state object.

◆ run()

Drupal\tripal\TripalPubParser\Interfaces\TripalPubParserInterface::run ( array  $criteria)

Performs the import.

Parameters
array$criteriaThe criteria used by the parser to retrieve and parse results.
Returns
array The uniform publication information array.

The documentation for this interface was generated from the following file: