You are here

function patterns_info_directories in Patterns 7.2

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

Displays a summary of available Patterns directories

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_directories()
patterns_info_page in includes/forms/info.inc
Displays a summary of available parsers, components, and patterns directories.

File

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

Code

function patterns_info_directories($form = array()) {
  $dirs = patterns_path_get_patterns_dirs();
  $dirs = patterns_array_to_rows($dirs);
  $header = array(
    t('N.'),
    t('Directory'),
  );
  $form['pd'] = array(
    '#type' => 'fieldset',
    '#title' => t('Patterns Directories'),
    '#collapsible' => TRUE,
    '#collapsed' => FALSE,
    '#description' => t('The following directories will be scanned for Patterns files.'),
  );
  $form['pd']['dirs'] = array(
    '#markup' => theme('table', array(
      'header' => $header,
      'rows' => $dirs,
    )),
  );
  return $form;
}