Skip to main content
added 209 characters in body
Source Link
CG Monroe
  • 3.1k
  • 10
  • 19

You can use the table theme type to do this. In your build section, return a render array that includes this:

return [
  '#type' => 'table',
  '#header' => $header,
  '#rows' => $rows,
];

Where header is an array of strings and rows is an array of row value arrays.

Some reference items I found:

New render element #type 'table'

Render arrays

You can use the table theme type to do this. In your build section, return a render array that includes this:

return [
  '#type' => 'table',
  '#header' => $header,
  '#rows' => $rows,
];

Where header is an array of strings and rows is an array of row value arrays.

You can use the table theme type to do this. In your build section, return a render array that includes this:

return [
  '#type' => 'table',
  '#header' => $header,
  '#rows' => $rows,
];

Where header is an array of strings and rows is an array of row value arrays.

Some reference items I found:

New render element #type 'table'

Render arrays

Source Link
CG Monroe
  • 3.1k
  • 10
  • 19

You can use the table theme type to do this. In your build section, return a render array that includes this:

return [
  '#type' => 'table',
  '#header' => $header,
  '#rows' => $rows,
];

Where header is an array of strings and rows is an array of row value arrays.