MarkupAdminDataTable::row() method

Add a row to the table (see arguments for details)

Example

// Populate 3 columns: first name, last name, email
$table->row([ 'Ryan', 'Cramer', 'ryan@processwire.com' ]); 

Usage

// basic usage
$self = $table->row(array $a);

// usage with all arguments
$self = $table->row(array $a, array $options = []);

Arguments

NameType(s)Description
$aarray

Array of columns that will each be a <td>, where each element may be one of the following:

  • string: converts to <td>string</td>
  • $a["key"] = "value": converts to <td><a href='value'>key</a></td>
  • [ 'label' => 'url' ]: converts to <td><a href='url'>label</a></td> (same as above, but in nested array with count 1)
  • [ 'label', 'class') ]: converts to <td class='class'>label</td>
  • true for any column to skip it, making the previous column colspan into it. 3.0.254+
$options (optional)array

Optionally specify any one of the following:

  • separator (bool): specify true to show a stronger visual separator above the column
  • class (string): specify one or more class names to apply to the <tr>
  • attrs (array): array of attr => value for attributes to add to the <tr>

Return value

self


$table methods and properties

API reference based on ProcessWire core version 3.0.255