Skip to content
Snippets Groups Projects
Commit 3dd7a193 authored by Angie Byron's avatar Angie Byron
Browse files

#645776 by jhodgdon, arianek, tobiasb, and matason: Update Field modules to new help standard.

parent 5a0ea2d5
No related branches found
No related tags found
No related merge requests found
......@@ -147,20 +147,27 @@ function field_help($path, $arg) {
$output .= '<h3>' . t('Uses') . '</h3>';
$output .= '<dl>';
$output .= '<dt>' . t('Enabling field types') . '</dt>';
$output .= '<dd>' . t('The Field module provides the infrastructure for fields and field attachment, but the field types themselves are provided by additional modules. Some of the modules are required; the optional modules can be enabled from the <a href="@modules">Modules administration page</a>. Drupal core includes the following field type modules:', array('@modules' => url('admin/config/modules')));
$output .= '<dl>';
$output .= '<dt>' . t('Number (required)') . '</dt>';
$output .= '<dd>' . t('Fields for storing numbers, in integer, decimal or floating point form. You may define a set of allowed inputs, or specify an allowable range of values. Several common formats for displaying numeric data are available.') . '</dd>';
$output .= '<dt>' . t('Text (required)') . '</dt>';
$output .= '<dd>' . t( "Fields for storing text. A text field may contain plain text only, or optionally, may use Drupal's input format filters to securely manage HTML output. Text input fields may be either a single line (text field), multiple lines (text area), or for greater input control, a select box, checkbox, or radio buttons. If desired, the field can be validated, so that it is limited to a set of allowed values.") . '</dd>';
$output .= '<dt>' . t('List (required)') . '</dt>';
$output .= '<dd>' . t('Fields for storing a list of items. Usually these items are inputted through a select list, checkboxes, or radio buttons.') . '</dd>';
$output .= '<dt>' . t('Image') . '</dt>';
$output .= '<dd>' . t('Fields for storing images.') . '</dd>';
$output .= '<dt>' . t('File') . '</dt>';
$output .= '<dd>' . t('Fields for attaching files to content.') . '</dd>';
$output .= '</dl></dd>';
$output .= '<dd>' . t('Additional fields may be provided by contributed modules, which you can find in the <a href="@contrib">contributed module section of drupal.org</a>.', array('@contrib' => 'http://drupal.org/project/modules')) . '</dd>';
$output .= '<dd>' . t('The Field module provides the infrastructure for fields and field attachment; the field types and input widgets themselves are provided by additional modules. Some of the modules are required; the optional modules can be enabled from the <a href="@modules">Modules administration page</a>. Drupal core includes the following field type modules: Number (required), Text (required), List (required), Taxonomy (optional), Image (optional), and File (optional); the required Options module provides input widgets for other field modules. Additional fields and widgets may be provided by contributed modules, which you can find in the <a href="@contrib">contributed module section of Drupal.org</a>. Currently enabled field and input widget modules:', array('@modules' => url('admin/config/modules'), '@contrib' => 'http://drupal.org/project/modules', '@options' => url('admin/help/options')));
// Make a list of all widget and field modules currently enabled, in
// order by displayed module name (module names are not translated).
$items = array();
$info = system_get_info('module');
$modules = array_merge(module_implements('field_info'), module_implements('field_widget_info'));
$modules = array_unique($modules);
sort($modules);
foreach ($modules as $module) {
$display = $info[$module]['name'];
if (module_hook($module, 'help')) {
$items['items'][] = l($display, 'admin/help/' . $module);
}
else {
$items['items'][] = $display;
}
}
$output .= theme('item_list', $items) . '</dd>';
$output .= '<dt>' . t('Managing field data storage') . '</dt>';
$output .= '<dd>' . t('Developers of field modules can either use the default <a href="@sql-store">Field SQL storage module</a> to store data for their fields, or a contributed or custom module developed using the <a href="@storage-api">field storage API</a>.', array('@storage-api' => 'http://api.drupal.org/api/group/field_storage/7', '@sql-store' => url('admin/help/field_sql_storage'))) . '</dd>';
$output .= '</dl>';
return $output;
}
......
......@@ -12,7 +12,9 @@
function field_sql_storage_help($path, $arg) {
switch ($path) {
case 'admin/help#field_sql_storage':
$output = '<p>' . t('The Field SQL Storage module stores Field API data in the database. It is the default field storage module, but other field storage modules may be available in the contributions repository.') . '</p>';
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('The Field SQL storage module stores field data in the database. It is the default field storage module; other field storage mechanisms may be available as contributed modules. See the <a href="@field-help">Field module help page</a> for more information about fields.', array('@field-help' => url('admin/help/field'))) . '</p>';
return $output;
}
}
......
......@@ -6,6 +6,19 @@
* Defines list field types that can be used with the Options module.
*/
/**
* Implements hook_help().
*/
function list_help($path, $arg) {
switch ($path) {
case 'admin/help#list':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('The List module defines various fields for storing a list of items, for use with the Field module. Usually these items are entered through a select list, checkboxes, or radio buttons. See the <a href="@field-help">Field module help page</a> for more information about fields.', array('@field-help' => url('admin/help/field'))) . '</p>';
return $output;
}
}
/**
* Implements hook_field_info().
*/
......
......@@ -6,6 +6,19 @@
* Defines selection, check box and radio button widgets for text and numeric fields.
*/
/**
* Implements hook_help().
*/
function options_help($path, $arg) {
switch ($path) {
case 'admin/help#options':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('The Options module defines checkbox, selection, and other input widgets for the Field module. See the <a href="@field-help">Field module help page</a> for more information about fields.', array('@field-help' => url('admin/help/field'))) . '</p>';
return $output;
}
}
/**
* Implements hook_theme().
*/
......
......@@ -6,6 +6,19 @@
* Defines simple text field types.
*/
/**
* Implements hook_help().
*/
function text_help($path, $arg) {
switch ($path) {
case 'admin/help#text':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t("The Text module defines various text field types for the Field module. A text field may contain plain text only, or optionally, may use Drupal's <a href='@filter-help'>text filters</a> to securely manage HTML output. Text input fields may be either a single line (text field), multiple lines (text area), or for greater input control, a select box, checkbox, or radio buttons. If desired, the field can be validated, so that it is limited to a set of allowed values. See the <a href='@field-help'>Field module help page</a> for more information about fields.", array('@field-help' => url('admin/help/field'), '@filter-help' => url('admin/help/filter'))) . '</p>';
return $output;
}
}
/**
* Implements hook_field_info().
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment