function patterns_info_parsers in Patterns 7
Same name and namespace in other branches
- 7.2 includes/forms/info.inc \patterns_info_parsers()
Displays a summary of Patterns parsers
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_parsers()
- patterns_info_page in includes/
forms/ info.inc - Displays a summary of available parsers, components, and patterns directories.
File
- includes/
forms/ info.inc, line 112 - Functions, forms related to display general information about the Patterns module as a whole.
Code
function patterns_info_parsers($form = array()) {
$parsers = patterns_parser_build_formats_index();
foreach ($parsers as $key => $value) {
$enabled = patterns_utils_is_module_enabled($value) ? t('Enabled') : t('Disabled');
$parsers[$key] = array(
$enabled,
$key,
$value,
);
}
$header = array(
t('Status'),
t('Format'),
t('Module'),
);
$form['parsers'] = array(
'#type' => 'fieldset',
'#title' => t('Patterns Parsers'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
'#description' => t('Go to the !modules page to enable more Patterns parsers.', array(
'!modules' => l(t('modules'), 'admin/modules'),
)),
);
$form['parsers']['parsers'] = array(
'#markup' => theme('table', array(
'header' => $header,
'rows' => $parsers,
'empty' => t('No valid parser found / enabled'),
)),
);
return $form;
}