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