You are here

function customfilter_settings in Custom filter 6

Same name and namespace in other branches
  1. 5 customfilter.module \customfilter_settings()
  2. 7.2 customfilter.module \customfilter_settings()
  3. 7 customfilter.module \customfilter_settings()

Module settings page.

1 string reference to 'customfilter_settings'
customfilter_menu in ./customfilter.module
Implements hook_menu().

File

./customfilter.admin.inc, line 569
Administration page callbacks for Custom filter.

Code

function customfilter_settings() {
  $rows = array();
  foreach (_customfilter_get_filters() as $id => $filter) {
    $row = array();
    $row[] = l($filter['name'], "admin/settings/customfilter/{$id}");
    $row[] = l(t('edit'), "admin/settings/customfilter/{$id}/edit");
    $row[] = l(t('delete'), "admin/settings/customfilter/{$id}/delete");
    $rows[] = $row;
  }
  if (!count($rows)) {
    $rows[] = array(
      array(
        'data' => t('No filters have been defined.'),
        'colspan' => 3,
      ),
    );
  }
  $header[] = t('Name');
  $header[] = array(
    'data' => t('Operations'),
    'colspan' => '2',
  );
  return theme('table', $header, $rows);
}