You are here

public function Signature::getInfo in SignatureField 1.x

Returns the element properties for this element.

Return value

array An array of element properties. See \Drupal\Core\Render\ElementInfoManagerInterface::getInfo() for documentation of the standard properties of all elements, and the return value format.

Overrides ElementInterface::getInfo

File

src/Element/Signature.php, line 19

Class

Signature
Provides a form element for a signature.

Namespace

Drupal\signaturefield\Element

Code

public function getInfo() {
  return [
    '#input' => TRUE,
    '#width' => '400',
    '#height' => '200',
    '#pen_color' => 'black',
    '#background_color' => 'rgba(0, 0, 0, 0)',
    '#default_value' => NULL,
    '#element_validate' => [
      [
        static::class,
        'validateElement',
      ],
    ],
    '#process' => [
      [
        static::class,
        'processElement',
      ],
    ],
    '#theme_wrappers' => [
      'form_element',
    ],
  ];
}