public static function WebformLink::getCompositeElements in Webform 8.5
Same name and namespace in other branches
- 6.x src/Element/WebformLink.php \Drupal\webform\Element\WebformLink::getCompositeElements()
Get a renderable array of webform elements.
Parameters
array $element: A render array for the current element.
Return value
array A renderable array of webform elements, containing the base properties for the composite's webform elements.
Overrides WebformCompositeBase::getCompositeElements
File
- src/
Element/ WebformLink.php, line 22
Class
- WebformLink
- Provides a webform element for a link.
Namespace
Drupal\webform\ElementCode
public static function getCompositeElements(array $element) {
$elements = [];
$elements['title'] = [
'#type' => 'textfield',
'#title' => t('Link Title'),
'#maxlength' => 255,
];
$elements['url'] = [
'#type' => 'url',
'#title' => t('Link URL'),
];
return $elements;
}