You are here

function defaultconfig_component_table in Default config 7

Render a a table with all modules having components of a particular type.

1 call to defaultconfig_component_table()
defaultconfig_admin in ./defaultconfig.admin.inc
Main administration page callback.

File

./defaultconfig.admin.inc, line 33
Main administration page for default config.

Code

function defaultconfig_component_table($component) {
  $modules = defaultconfig_modules($component);
  if (count($modules)) {
    $data = array();

    // @todo fetch more information about the modules. For now, let's just
    // use the machine name.
    foreach ($modules as $module) {
      $data[] = array(
        $module,
        l(t('rebuild'), 'admin/structure/defaultconfig/rebuild/' . $module . '/' . $component['name']),
      );
    }
    return array(
      '#theme' => 'table',
      '#header' => array(
        t('Module'),
        t('Operations'),
      ),
      '#rows' => $data,
    );
  }
  return FALSE;
}