Files
pmgr/site/views/elements/monetary_sources.ctp

19 lines
640 B
PHP

<?php /* -*- mode:PHP -*- */
// Define the table columns
$cols = array();
$cols['ID'] = array('index' => 'MonetarySource.id', 'formatter' => 'id');
$cols['Name'] = array('index' => 'MonetarySource.name', 'formatter' => 'longname');
$cols['Comment'] = array('index' => 'MonetarySource.comment', 'formatter' => 'comment');
// Set up search fields if requested by caller
if (isset($searchfields))
$grid->searchFields(array('ID', 'Name'));
// Render the grid
$grid
->columns($cols)
->sortField('ID')
->defaultFields(array('ID', 'Name'))
->render($this, isset($config) ? $config : null);