class Export in Bibliography & Citation 2.0.x
Same name and namespace in other branches
- 8 modules/bibcite_export/src/Plugin/bibcite/link/Export.php \Drupal\bibcite_export\Plugin\bibcite\link\Export
Build link to export reference entity.
Plugin annotation
@BibciteLink(
  id = "export",
  label = @Translation("Export"),
  deriver = "Drupal\bibcite_export\Plugin\Derivative\FormatExportLink",
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface- class \Drupal\bibcite_entity\Plugin\BibciteLinkPluginBase implements BibciteLinkPluginInterface- class \Drupal\bibcite_export\Plugin\bibcite\link\Export implements ContainerFactoryPluginInterface
 
 
- class \Drupal\bibcite_entity\Plugin\BibciteLinkPluginBase implements BibciteLinkPluginInterface
Expanded class hierarchy of Export
5 string references to 'Export'
- bibcite_export.links.menu.yml in modules/bibcite_export/ bibcite_export.links.menu.yml 
- modules/bibcite_export/bibcite_export.links.menu.yml
- bibcite_export.links.task.yml in modules/bibcite_export/ bibcite_export.links.task.yml 
- modules/bibcite_export/bibcite_export.links.task.yml
- bibcite_export.routing.yml in modules/bibcite_export/ bibcite_export.routing.yml 
- modules/bibcite_export/bibcite_export.routing.yml
- ExportAllForm::buildForm in modules/bibcite_export/ src/ Form/ ExportAllForm.php 
- Form constructor.
- ExportMultipleForm::getConfirmText in modules/bibcite_export/ src/ Form/ ExportMultipleForm.php 
- Returns a caption for the button that confirms the action.
File
- modules/bibcite_export/ src/ Plugin/ bibcite/ link/ Export.php, line 21 
Namespace
Drupal\bibcite_export\Plugin\bibcite\linkView source
class Export extends BibciteLinkPluginBase implements ContainerFactoryPluginInterface {
  /**
   * Format manager.
   *
   * @var \Drupal\bibcite\Plugin\BibciteFormatManagerInterface
   */
  protected $formatManager;
  /**
   * {@inheritdoc}
   */
  public function __construct(array $configuration, $plugin_id, $plugin_definition, BibciteFormatManagerInterface $format_manager) {
    parent::__construct($configuration, $plugin_id, $plugin_definition);
    $this->formatManager = $format_manager;
  }
  /**
   * {@inheritdoc}
   */
  public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
    return new static($configuration, $plugin_id, $plugin_definition, $container
      ->get('plugin.manager.bibcite_format'));
  }
  /**
   * {@inheritdoc}
   */
  public function buildUrl(ReferenceInterface $reference) {
    if ($reference
      ->isNew()) {
      return NULL;
    }
    $format_id = $this->pluginDefinition['export_format'];
    $definition = $this->formatManager
      ->getDefinition($format_id);
    return Url::fromRoute('bibcite_export.export', [
      'bibcite_format' => $definition['id'],
      'entity_type' => $reference
        ->getEntityTypeId(),
      'entity' => $reference
        ->id(),
    ]);
  }
}Members
| Name   | Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| BibciteLinkPluginBase:: | public | function | Build link using data from Reference entity. Overrides BibciteLinkPluginInterface:: | |
| BibciteLinkPluginBase:: | public | function | Get plugin label. Overrides BibciteLinkPluginInterface:: | |
| Export:: | protected | property | Format manager. | |
| Export:: | public | function | Build URL object. Overrides BibciteLinkPluginBase:: | |
| Export:: | public static | function | Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface:: | |
| Export:: | public | function | Constructs a \Drupal\Component\Plugin\PluginBase object. Overrides PluginBase:: | |
| PluginBase:: | protected | property | Configuration information passed into the plugin. | 1 | 
| PluginBase:: | protected | property | The plugin implementation definition. | 1 | 
| PluginBase:: | protected | property | The plugin_id. | |
| PluginBase:: | constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
| PluginBase:: | public | function | Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: | |
| PluginBase:: | public | function | Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: | |
| PluginBase:: | public | function | Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: | 2 | 
| PluginBase:: | public | function | Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: | |
| PluginBase:: | public | function | Determines if the plugin is configurable. | 
