You are here

public function CodeMirror::getInfo in The CodeMirror Editor 8

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 Textarea::getInfo

File

src/Element/CodeMirror.php, line 31

Class

CodeMirror
Provides a form element for input text with code highlighting.

Namespace

Drupal\codemirror_editor\Element

Code

public function getInfo() {
  $info = parent::getInfo();
  $info['#codemirror'] = [];
  $info['#pre_render'][] = [
    static::class,
    'preRenderCodeMirror',
  ];
  return $info;
}