BibciteFormat.php in Bibliography & Citation 2.0.x
File
src/Plugin/BibciteFormat.php
View source
<?php
namespace Drupal\bibcite\Plugin;
use Drupal\Core\Plugin\PluginBase;
use Symfony\Component\Serializer\Encoder\DecoderInterface;
use Symfony\Component\Serializer\Encoder\EncoderInterface;
class BibciteFormat extends PluginBase implements BibciteFormatInterface {
public function getFields() {
return $this->pluginDefinition['fields'];
}
public function getTypes() {
return $this->pluginDefinition['types'];
}
public function getLabel() {
return $this->pluginDefinition['label'];
}
public function getExtension() {
return $this->pluginDefinition['extension'];
}
public function isExportFormat() {
return !empty($this->pluginDefinition['encoder']) && is_subclass_of($this->pluginDefinition['encoder'], EncoderInterface::class);
}
public function isImportFormat() {
return !empty($this->pluginDefinition['encoder']) && is_subclass_of($this->pluginDefinition['encoder'], DecoderInterface::class);
}
}