You are here

public function ConfigurableDummyAttribute::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

tests/linkit_test/src/Plugin/Linkit/Attribute/ConfigurableDummyAttribute.php, line 28
Contains \Drupal\linkit_test\Plugin\Linkit\Attribute\ConfigurableDummyAttribute.

Class

ConfigurableDummyAttribute
Accesskey attribute.

Namespace

Drupal\linkit_test\Plugin\Linkit\Attribute

Code

public function buildFormElement($default_value) {
  return [
    '#type' => 'textfield',
    '#title' => t('DummyAttribute'),
    '#default_value' => $default_value,
    '#maxlength' => 255,
    '#size' => 40,
  ];
}