An Introduction to the Table Class
The Table control is used to present a collection of objects or data in a grid-based
(e.g. <table>) format. All Table objects take in a DataSource, which can be an array
of anything (or in our example, an array of Person objects).
When creating a Table, you must create a table column for each column in your table.
For each Column type you specify its name and how it should be rendered.
In our example below, we create a CallableColumn column, which takes a
PHP callable type, and lets you define a callback that will return the text of each cell in the column. The
callback will be called repeatedly for each row in the table, and each time will be passed the data for the row
it is to draw.
The Table's style is fully customizable, at both the column level and the row level.
You can style the whole table with css, or specify classes for individual parts of the table. You can even specify
how individual cells are drawn.