protected function BibciteFormatManager::filterDefinitionsBySubclass in Bibliography & Citation 8
Same name and namespace in other branches
- 2.0.x src/Plugin/BibciteFormatManager.php \Drupal\bibcite\Plugin\BibciteFormatManager::filterDefinitionsBySubclass()
Get definitions filtered by subclass.
Parameters
object|string $subclass: A class name or an object instance.
Return value
array|null List of filtered plugin definitions.
2 calls to BibciteFormatManager::filterDefinitionsBySubclass()
- BibciteFormatManager::getExportDefinitions in src/
Plugin/ BibciteFormatManager.php - Get definitions of export formats.
- BibciteFormatManager::getImportDefinitions in src/
Plugin/ BibciteFormatManager.php - Get definitions of import formats.
File
- src/
Plugin/ BibciteFormatManager.php, line 75
Class
- BibciteFormatManager
- Provides the default bibcite_format manager.
Namespace
Drupal\bibcite\PluginCode
protected function filterDefinitionsBySubclass($subclass) {
$definitions = $this
->getDefinitions();
return array_filter($definitions, function ($definition) use ($subclass) {
return is_subclass_of($definition['encoder'], $subclass);
});
}