abstract class BibciteLinkPluginBase in Bibliography & Citation 8
Same name and namespace in other branches
- 2.0.x modules/bibcite_entity/src/Plugin/BibciteLinkPluginBase.php \Drupal\bibcite_entity\Plugin\BibciteLinkPluginBase
 
Base class for Link plugins.
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\bibcite_entity\Plugin\BibciteLinkPluginBase implements BibciteLinkPluginInterface
 
 
Expanded class hierarchy of BibciteLinkPluginBase
4 files declare their use of BibciteLinkPluginBase
- DOI.php in modules/
bibcite_entity/ src/ Plugin/ bibcite/ link/ DOI.php  - Export.php in modules/
bibcite_export/ src/ Plugin/ bibcite/ link/ Export.php  - GoogleScholar.php in modules/
bibcite_entity/ src/ Plugin/ bibcite/ link/ GoogleScholar.php  - PubMed.php in modules/
bibcite_entity/ src/ Plugin/ bibcite/ link/ PubMed.php  
File
- modules/
bibcite_entity/ src/ Plugin/ BibciteLinkPluginBase.php, line 12  
Namespace
Drupal\bibcite_entity\PluginView source
abstract class BibciteLinkPluginBase extends PluginBase implements BibciteLinkPluginInterface {
  /**
   * {@inheritdoc}
   */
  public function getLabel() {
    return $this->pluginDefinition['label'];
  }
  /**
   * Build URL object.
   *
   * @param \Drupal\bibcite_entity\Entity\ReferenceInterface $reference
   *   Reference entity object.
   */
  protected function buildUrl(ReferenceInterface $reference) {
  }
  /**
   * {@inheritdoc}
   */
  public function build(ReferenceInterface $reference) {
    if ($url = $this
      ->buildUrl($reference)) {
      return Link::fromTextAndUrl($this
        ->getLabel(), $url)
        ->toRenderable();
    }
    return NULL;
  }
}Members
| 
            Name | 
                  Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| 
            BibciteLinkPluginBase:: | 
                  public | function | 
            Build link using data from Reference entity. Overrides BibciteLinkPluginInterface:: | 
                  |
| 
            BibciteLinkPluginBase:: | 
                  protected | function | Build URL object. | 4 | 
| 
            BibciteLinkPluginBase:: | 
                  public | function | 
            Get plugin label. Overrides BibciteLinkPluginInterface:: | 
                  |
| 
            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:: | 
                  3 | 
| 
            PluginBase:: | 
                  public | function | 
            Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: | 
                  |
| 
            PluginBase:: | 
                  public | function | Determines if the plugin is configurable. | |
| 
            PluginBase:: | 
                  public | function | Constructs a \Drupal\Component\Plugin\PluginBase object. | 92 |