function dbtng_example_help in Examples for Developers 7
Implements hook_help().
Show some help on each form provided by this module.
Related topics
File
- dbtng_example/
dbtng_example.module, line 356 - This is an example outlining how a module can make use of the new DBTNG database API in Drupal 7.
Code
function dbtng_example_help($path) {
$output = '';
switch ($path) {
case 'examples/dbtng':
$output = t('Generate a list of all entries in the database. There is no filter in the query.');
break;
case 'examples/dbtng/selectivelist':
$output = t('Only bring in certain fields with your select query.') . ' ';
$output .= t('Only the name and age are brought in with this query. We should only bring in the fields we need rather than always using *');
break;
case 'examples/dbtng/advanced':
$output = t('A more complex list of entries in the database.') . ' ';
$output .= t('Only the entries with name = "John" and age older than 18 years are shown, the username of the person who created the entry is also shown.');
break;
case 'examples/dbtng/update':
$output = t('Demonstrates a database update operation.');
break;
case 'examples/dbtng/add':
$output = t('Add an entry to the dbtng_example table.');
break;
case 'examples/dbtng/grouping_list':
$output = t('Groups the result set by the specified field and render a list of entries in the database. e.g The records will be displayed in grouping format for column "name" and COUNT("name") is used as aggregate function');
break;
}
return $output;
}