Tripal
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
Drupal\tripal\TripalPubLibrary\PluginManagers\TripalPubLibraryManager Class Reference
Inheritance diagram for Drupal\tripal\TripalPubLibrary\PluginManagers\TripalPubLibraryManager:
Inheritance graph
[legend]
Collaboration diagram for Drupal\tripal\TripalPubLibrary\PluginManagers\TripalPubLibraryManager:
Collaboration graph
[legend]

Public Member Functions

 __construct (\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, Connection $conn)
 
 getSearchQuery (int $query_id)
 
 getSearchQueries ()
 
 addSearchQuery (array $query)
 
 updateSearchQuery (int $query_id, array $query)
 
 deleteSearchQuery (int $query_id)
 
 getLibraryOptions ()
 

Protected Attributes

 $connection
 

Detailed Description

Provides a tripal importer plugin manager.

Constructor & Destructor Documentation

◆ __construct()

Drupal\tripal\TripalPubLibrary\PluginManagers\TripalPubLibraryManager::__construct ( \Traversable  $namespaces,
CacheBackendInterface  $cache_backend,
ModuleHandlerInterface  $module_handler,
Connection  $conn 
)

Constructs a new publication parser manager.

Parameters
\Traversable$namespacesAn object that implements \Traversable which contains the root paths keyed by the corresponding namespace to look for plugin implementations.
\Drupal\Core\Extension\ModuleHandlerInterface$module_handlerThe module handler.
string$plugin_interfaceThe interface each plugin should implement.
string$plugin_definition_annotation_nameThe name of the annotation that contains the plugin definition.

Member Function Documentation

◆ addSearchQuery()

Drupal\tripal\TripalPubLibrary\PluginManagers\TripalPubLibraryManager::addSearchQuery ( array  $query)

Add a new Tripal Pub Library Query

This method will add a new pub library query to the 'tripal_pub_library_query' table in the public schema of the database.

Parameters
$queryThe query data in the form of an array

◆ deleteSearchQuery()

Drupal\tripal\TripalPubLibrary\PluginManagers\TripalPubLibraryManager::deleteSearchQuery ( int  $query_id)

Delete a Tripal Pub Library Query record

This method will delete a pub library query from the tripal_pub_library_query table in the public schema of the database if it matches the query_id parameter.

Parameters
$query_idThe query_id which matches the existing query_id of the table

◆ getLibraryOptions()

Drupal\tripal\TripalPubLibrary\PluginManagers\TripalPubLibraryManager::getLibraryOptions ( )

Returns a list of library options, sorted and ready to use in a form.

Returns
array The sorted associative array of options

◆ getSearchQueries()

Drupal\tripal\TripalPubLibrary\PluginManagers\TripalPubLibraryManager::getSearchQueries ( )

Retrieve all Tripal Pub Library Query records

This method will look for all pub library queries from the 'tripal_pub_library_query' table in the public schema of the database. It will return these records as an array.

Returns
array An array containing all pub library queries as row objects

◆ getSearchQuery()

Drupal\tripal\TripalPubLibrary\PluginManagers\TripalPubLibraryManager::getSearchQuery ( int  $query_id)

Retrieve a Tripal Pub Library Query record

This method will look for a pub library query from the 'tripal_pub_library_query' table in the public schema of the database.

Parameters
$query_idUnique ID of the query (primary key)
Returns
object A row object with the pub query data from the database

◆ updateSearchQuery()

Drupal\tripal\TripalPubLibrary\PluginManagers\TripalPubLibraryManager::updateSearchQuery ( int  $query_id,
array  $query 
)

Update a Tripal Pub Library Query record

This method will update a pub library query from the tripal_pub_library_query table in the public schema of the database if it matches the query_id parameter.

Parameters
$query_idThe query_id which matches the existing query_id of the table
$queryAn array containing the updated query data

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