Lets you wrap a bunch of array data into a ViewableData object. For an example of ArrayData in use, see tutorial:3-forms: Showing the poll results
Here is an example of simply turning an Array into a ViewableData object so that it can displayed in a template:
// Create new data object set containing the subscribers who have not been sent this newsletter: $unsent_subscribers = new DataObjectSet(); foreach($unsent_subscribers_array as $key => $data) { $unsent_subscribers->push(new ArrayData($data)); } return $unsent_subscribers;
Above code taken from cms/code/Newsletter/Newsletter.php gsoc branch r38859.
Please use comments for notes, tips and corrections about the described
functionality.
Use the Silverstripe Forum to
ask questions.