You are here

public static function FormatFactory::getPluginClass in Bibliography & Citation 8

Same name and namespace in other branches
  1. 2.0.x src/Plugin/Factory/FormatFactory.php \Drupal\bibcite\Plugin\Factory\FormatFactory::getPluginClass()

Finds the class relevant for a given plugin.

Parameters

string $plugin_id: The id of a plugin.

\Drupal\Component\Plugin\Definition\PluginDefinitionInterface|mixed[] $plugin_definition: The plugin definition associated with the plugin ID.

string $required_interface: (optional) The required plugin interface.

Return value

string The appropriate class name.

Throws

\Drupal\Component\Plugin\Exception\PluginException Thrown when there is no class specified, the class doesn't exist, or the class does not implement the specified required interface.

Overrides DefaultFactory::getPluginClass

File

src/Plugin/Factory/FormatFactory.php, line 15

Class

FormatFactory
Factory for bibcite format plugin.

Namespace

Drupal\bibcite\Plugin\Factory

Code

public static function getPluginClass($plugin_id, $plugin_definition = NULL, $required_interface = NULL) {

  // Only one class for all plugins.
  return '\\Drupal\\bibcite\\Plugin\\BibciteFormat';
}