You are here

public function TokenTreeTable::getInfo in Token 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 Table::getInfo

File

src/Element/TokenTreeTable.php, line 20

Class

TokenTreeTable
Provides a render element for a token tree table.

Namespace

Drupal\token\Element

Code

public function getInfo() {
  $class = get_class($this);
  return [
    '#header' => [],
    '#rows' => [],
    '#token_tree' => [],
    '#columns' => [
      'name',
      'token',
      'description',
    ],
    '#empty' => '',
    '#show_restricted' => FALSE,
    '#show_nested' => FALSE,
    '#skip_empty_values' => FALSE,
    '#click_insert' => TRUE,
    '#sticky' => FALSE,
    '#responsive' => TRUE,
    '#input' => FALSE,
    '#pre_render' => [
      [
        $class,
        'preRenderTokenTree',
      ],
      [
        $class,
        'preRenderTable',
      ],
    ],
    '#theme' => 'table__token_tree',
    '#attached' => [
      'library' => [
        'token/token',
      ],
    ],
  ];
}