You are here

public function ChartDataCollectorTable::getInfo in Charts 5.0.x

Same name and namespace in other branches
  1. 8.4 src/Element/ChartDataCollectorTable.php \Drupal\charts\Element\ChartDataCollectorTable::getInfo()

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/ChartDataCollectorTable.php, line 26

Class

ChartDataCollectorTable
Provides a chart data collector table form element.

Namespace

Drupal\charts\Element

Code

public function getInfo() {
  $class = get_class($this);
  return [
    '#input' => TRUE,
    // Either to enable csv import.
    '#import_csv' => TRUE,
    '#import_csv_separator' => ',',
    // The initial number of rows to generate.
    '#initial_rows' => 5,
    // The initial number of columns to generate.
    '#initial_columns' => 2,
    // The optional element the table should be wrapped in.
    '#table_wrapper' => '',
    '#table_wrapper_attributes' => [],
    '#table_attributes' => [],
    // Allows to toggle on/off drupal tabledrag functionality.
    '#table_drag' => TRUE,
    '#process' => [
      [
        $class,
        'processDataCollectorTable',
      ],
    ],
    '#element_validate' => [
      [
        $class,
        'validateDataCollectorTable',
      ],
    ],
    '#theme_wrappers' => [
      'container',
    ],
  ];
}