Version 1
[yaffs-website] / web / modules / contrib / metatag / src / Plugin / metatag / Tag / Title.php
diff --git a/web/modules/contrib/metatag/src/Plugin/metatag/Tag/Title.php b/web/modules/contrib/metatag/src/Plugin/metatag/Tag/Title.php
new file mode 100644 (file)
index 0000000..98860b0
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+
+namespace Drupal\metatag\Plugin\metatag\Tag;
+
+/**
+ * The standard page title.
+ *
+ * @MetatagTag(
+ *   id = "title",
+ *   label = @Translation("Page title"),
+ *   description = @Translation("The text to display in the title bar of a visitor's web browser when they view this page. This meta tag may also be used as the title of the page when a visitor bookmarks or favorites this page. It is common to append '[site:name]' to the end of this, so the site's name is automatically added."),
+ *   name = "title",
+ *   group = "basic",
+ *   weight = -1,
+ *   type = "label",
+ *   secure = FALSE,
+ *   multiple = FALSE
+ * )
+ */
+class Title extends MetaNameBase {
+
+  /**
+   * Override the output of this tag so it's an actual TITLE tag.
+   *
+   * @todo Override the existing title tag X-)
+   */
+  // public function output() {
+  //   if (empty($this->value)) {
+  //     // If there is no value, we don't want a tag output.
+  //     $element = '';
+  //   }
+  //   else {
+  //     $element = [
+  //       '#theme' => 'hidden',
+  //       // '#tag' => 'title',
+  //       '#value' => $this->value(),
+  //     ];
+  //   }
+  //
+  //   return $element;
+  // }
+}