public function Relationship::buildFormElement in Linkit 8.4
The form element structure for this attribute to be used in the dialog.
Parameters
mixed $default_value: The default value for the element. Used when editing an attribute in the dialog.
Return value
array The form element.
Overrides AttributeInterface::buildFormElement
File
- src/
Plugin/ Linkit/ Attribute/ Relationship.php, line 27 - Contains \Drupal\linkit\Plugin\Linkit\Attribute\Relationship.
Class
- Relationship
- Relationship attribute.
Namespace
Drupal\linkit\Plugin\Linkit\AttributeCode
public function buildFormElement($default_value) {
return [
'#type' => 'textfield',
'#title' => t('Relationship'),
'#default_value' => $default_value,
'#maxlength' => 255,
'#size' => 40,
'#placeholder' => t('The "rel" attribute value'),
];
}