You are here

public function FooTable::getInfo in FooTable 8.2

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/FooTable.php, line 20

Class

FooTable
Provides a render element for a FooTable.

Namespace

Drupal\footable\Element

Code

public function getInfo() {
  $info = parent::getInfo();
  $class = get_class($this);
  $info['#process'][] = [
    $class,
    'processFooTable',
  ];
  $info['#pre_render'][] = [
    $class,
    'preRenderFooTable',
  ];
  $info['#theme'] = 'footable';
  foreach (static::getProperties() as $key => $property) {
    $info['#' . $key] = $property['default'] ?? NULL;
  }
  return $info;
}