You are here

function patterns_info_components in Patterns 7.2

Same name and namespace in other branches
  1. 7 includes/forms/info.inc \patterns_info_components()

Displays a summary of available Patterns components

Parameters

array $form (optional) If specified, the form: will be appended here

Return value

array $form The form to be rendered

1 call to patterns_info_components()
patterns_info_page in includes/forms/info.inc
Displays a summary of available parsers, components, and patterns directories.

File

includes/forms/info.inc, line 70
Functions, forms related to display general information about the Patterns module as a whole.

Code

function patterns_info_components($form = array()) {
  $components = patterns_io_list_components();
  foreach ($components as $key => $value) {
    $name = basename($value);
    $components[$key] = array(
      $name,
      $value,
    );
  }
  $header = array(
    t('Name'),
    t('Path'),
  );
  $form['cd'] = array(
    '#type' => 'fieldset',
    '#title' => t('Patterns Components'),
    '#collapsible' => TRUE,
    '#collapsed' => FALSE,
    '#description' => t('The following Patterns components were found and are currently available.'),
  );
  $form['cd']['components'] = array(
    '#markup' => theme('table', array(
      'header' => $header,
      'rows' => $components,
    )),
  );
  return $form;
}