Upgraded drupal core with security updates
[yaffs-website] / web / core / lib / Drupal / Core / Http / LinkRelationType.php
1 <?php
2
3 namespace Drupal\Core\Http;
4
5 use Drupal\Core\Plugin\PluginBase;
6
7 /**
8  * Defines a single link relationship type.
9  */
10 class LinkRelationType extends PluginBase implements LinkRelationTypeInterface {
11
12   /**
13    * {@inheritdoc}
14    */
15   public function isRegistered() {
16     return !$this->isExtension();
17   }
18
19   /**
20    * {@inheritdoc}
21    */
22   public function isExtension() {
23     return isset($this->pluginDefinition['uri']);
24   }
25
26   /**
27    * {@inheritdoc}
28    */
29   public function getRegisteredName() {
30     return $this->isRegistered() ? $this->getPluginId() : NULL;
31   }
32
33   /**
34    * {@inheritdoc}
35    */
36   public function getExtensionUri() {
37     return $this->isExtension() ? $this->pluginDefinition['uri'] : NULL;
38   }
39
40   /**
41    * {@inheritdoc}
42    */
43   public function getDescription() {
44     return isset($this->pluginDefinition['description']) ? $this->pluginDefinition['description'] : '';
45   }
46
47   /**
48    * {@inheritdoc}
49    */
50   public function getReference() {
51     return isset($this->pluginDefinition['reference']) ? $this->pluginDefinition['reference'] : '';
52   }
53
54   /**
55    * {@inheritdoc}
56    */
57   public function getNotes() {
58     return isset($this->pluginDefinition['notes']) ? $this->pluginDefinition['notes'] : '';
59   }
60
61 }