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

Public Member Functions

 __construct (\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, \Drupal\tripal\Services\TripalLogger $logger)
 
 createInstance ($plugin_id, array $configuration=[])
 
 publishBundles (array $storages)
 

Static Public Member Functions

static create (ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition)
 
static runTripalJob ($bundle, $datastore, $options=[], \Drupal\tripal\Services\TripalJob $job=NULL)
 

Protected Attributes

 $logger = NULL
 

Detailed Description

Provides a TripalBackendPublish plugin manager.

Constructor & Destructor Documentation

◆ __construct()

Drupal\tripal\TripalBackendPublish\PluginManager\TripalBackendPublishManager::__construct ( \Traversable  $namespaces,
CacheBackendInterface  $cache_backend,
ModuleHandlerInterface  $module_handler,
\Drupal\tripal\Services\TripalLogger  $logger 
)

Constructs a new TripalBackendPublish 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.
\Drupal\tripal\Services\TripalLogger$logger

Member Function Documentation

◆ create()

static Drupal\tripal\TripalBackendPublish\PluginManager\TripalBackendPublishManager::create ( ContainerInterface  $container,
array  $configuration,
  $plugin_id,
  $plugin_definition 
)
static

Implements ContainerFactoryPluginInterface->create().

Since we have implemented the ContainerFactoryPluginInterface this static function will be called behind the scenes when a Plugin Manager uses createInstance(). Specifically this method is used to determine the parameters to pass to the constructor.

Parameters
\Symfony\Component\DependencyInjection\ContainerInterface$container
array$configuration
string$plugin_id
mixed$plugin_definition
Returns
static

◆ createInstance()

Drupal\tripal\TripalBackendPublish\PluginManager\TripalBackendPublishManager::createInstance (   $plugin_id,
array  $configuration = [] 
)

{}

OVERRIDE: We need to override the default implementation here in order to pass in the dependencies cleanly :-)

◆ publishBundles()

Drupal\tripal\TripalBackendPublish\PluginManager\TripalBackendPublishManager::publishBundles ( array  $storages)

Publish a number of bundles for specific publish instances.

Parameters
array$storagesAn associative array keyed by the id for the TripalBackendPublish plugin instance (e.g. chado_storage), and the value is a second array level with:
  • 'bundles' = a list of zero or more bundles to be published.
  • 'schema_name' = The database schema to publish under, e.g. 'chado'.
Returns
void No return value.

◆ runTripalJob()

static Drupal\tripal\TripalBackendPublish\PluginManager\TripalBackendPublishManager::runTripalJob (   $bundle,
  $datastore,
  $options = [],
\Drupal\tripal\Services\TripalJob  $job = NULL 
)
static

Publish content of a specified type. Uses a Tripal service.

Parameters
string$bundleThe entity type id (bundle) to be published.
string$datastoreThe plugin id for the TripalStorage backend to publish from, for example 'chado_storage'.
array$optionsAssociative array of additional options to pass to the publish plugin. Valid keys are 'schema_name', 'republish', 'batch_size'.
\Drupal\tripal\Services\TripalJob$jobAn optional TripalJob object.

Member Data Documentation

◆ $logger

Drupal tripal Services TripalLogger Drupal\tripal\TripalBackendPublish\PluginManager\TripalBackendPublishManager::$logger = NULL
protected

The TripalLogger object.


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