Version 1
[yaffs-website] / web / modules / contrib / linkit / src / Plugin / Linkit / Attribute / Accesskey.php
diff --git a/web/modules/contrib/linkit/src/Plugin/Linkit/Attribute/Accesskey.php b/web/modules/contrib/linkit/src/Plugin/Linkit/Attribute/Accesskey.php
new file mode 100644 (file)
index 0000000..e0a609f
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\linkit\Plugin\Linkit\Attribute\Accesskey.
+ */
+
+namespace Drupal\linkit\Plugin\Linkit\Attribute;
+
+use Drupal\linkit\AttributeBase;
+
+/**
+ * Accesskey attribute.
+ *
+ * @Attribute(
+ *   id = "accesskey",
+ *   label = @Translation("Accesskey"),
+ *   html_name = "accesskey",
+ *   description = @Translation("Basic input field for the accesskey attribute.")
+ * )
+ */
+class Accesskey extends AttributeBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function buildFormElement($default_value) {
+    return [
+      '#type' => 'textfield',
+      '#title' => t('Accesskey'),
+      '#default_value' => $default_value,
+      '#maxlength' => 255,
+      '#size' => 40,
+      '#placeholder' => t('The "accesskey" attribute value'),
+    ];
+  }
+
+}