Version 1
[yaffs-website] / web / modules / contrib / linkit / src / Plugin / Linkit / Attribute / Accesskey.php
1 <?php
2
3 /**
4  * @file
5  * Contains \Drupal\linkit\Plugin\Linkit\Attribute\Accesskey.
6  */
7
8 namespace Drupal\linkit\Plugin\Linkit\Attribute;
9
10 use Drupal\linkit\AttributeBase;
11
12 /**
13  * Accesskey attribute.
14  *
15  * @Attribute(
16  *   id = "accesskey",
17  *   label = @Translation("Accesskey"),
18  *   html_name = "accesskey",
19  *   description = @Translation("Basic input field for the accesskey attribute.")
20  * )
21  */
22 class Accesskey extends AttributeBase {
23
24   /**
25    * {@inheritdoc}
26    */
27   public function buildFormElement($default_value) {
28     return [
29       '#type' => 'textfield',
30       '#title' => t('Accesskey'),
31       '#default_value' => $default_value,
32       '#maxlength' => 255,
33       '#size' => 40,
34       '#placeholder' => t('The "accesskey" attribute value'),
35     ];
36   }
37
38 }