You are here

public function YamlFormCodeMirror::getInfo in YAML Form 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/YamlFormCodeMirror.php, line 33

Class

YamlFormCodeMirror
Provides a form element for HTML, YAML, or Plain text using CodeMirror.

Namespace

Drupal\yamlform\Element

Code

public function getInfo() {
  $class = get_class($this);
  return [
    '#input' => TRUE,
    '#mode' => 'text',
    '#skip_validation' => FALSE,
    '#cols' => 60,
    '#rows' => 5,
    '#resizable' => 'vertical',
    '#process' => [
      [
        $class,
        'processYamlFormCodeMirror',
      ],
      [
        $class,
        'processAjaxForm',
      ],
      [
        $class,
        'processGroup',
      ],
    ],
    '#pre_render' => [
      [
        $class,
        'preRenderYamlFormCodeMirror',
      ],
      [
        $class,
        'preRenderGroup',
      ],
    ],
    '#element_validate' => [
      [
        $class,
        'validateYamlFormCodeMirror',
      ],
    ],
    '#theme' => 'textarea',
    '#theme_wrappers' => [
      'form_element',
    ],
  ];
}