Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / modules / contrib / metatag / src / Plugin / metatag / Tag / MetaPropertyBase.php
index 770124fe951b63810c7321acfc2654e4834697c1..c242d23cf15a1bc1476e2c3b87986f2ed0837ab3 100644 (file)
@@ -1,39 +1,17 @@
 <?php
 
-/**
- * This base plugin allows "property"-style meta tags, e.g. Open Graph tags, to
- * be further customized.
- */
-
 namespace Drupal\metatag\Plugin\metatag\Tag;
 
+/**
+ * This base plugin allows "property"-style meta tags tobe customized.
+ *
+ * Used with e.g. the Open Graph tags.
+ */
 abstract class MetaPropertyBase extends MetaNameBase {
+
   /**
-   * Display the meta tag.
+   * {@inheritdoc}
    */
-  public function output() {
-    if (empty($this->value)) {
-      // If there is no value, we don't want a tag output.
-      $element = '';
-    }
-    else {
-      // Parse out the image URL, if needed.
-      $value = $this->parseImageURL();
-
-      // If tag must be secure, convert all http:// to https://.
-      if ($this->secure() && strpos($value, 'http://') !== FALSE) {
-        $value = str_replace('http://', 'https://', $value);
-      }
-
-      $element = [
-        '#tag' => 'meta',
-        '#attributes' => [
-          'property' => $this->name,
-          'content' => $value,
-        ]
-      ];
-    }
+  protected $nameAttribute = 'property';
 
-    return $element;
-  }
 }