This repository has been archived on 2025-09-29. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
drupalcampbristol/web/modules/contrib/webform/src/Element/WebformLink.php
2017-03-16 15:29:07 +00:00

29 lines
522 B
PHP

<?php
namespace Drupal\webform\Element;
/**
* Provides a webform element for a link.
*
* @FormElement("webform_link")
*/
class WebformLink extends WebformCompositeBase {
/**
* {@inheritdoc}
*/
public static function getCompositeElements() {
$elements = [];
$elements['title'] = [
'#type' => 'textfield',
'#title' => t('Link Title'),
'#maxlength' => 255,
];
$elements['url'] = [
'#type' => 'url',
'#title' => t('Link URL'),
];
return $elements;
}
}