You are here

function themekey_help_properties_form in ThemeKey 7.3

Same name and namespace in other branches
  1. 6.4 themekey_help.inc \themekey_help_properties_form()
  2. 6.2 themekey_help.inc \themekey_help_properties_form()
  3. 6.3 themekey_help.inc \themekey_help_properties_form()
  4. 7 themekey_help.inc \themekey_help_properties_form()
  5. 7.2 themekey_help.inc \themekey_help_properties_form()

Uses Drupal's form builder to format ThemeKey's help properties

See also

themekey_help()

3 string references to 'themekey_help_properties_form'
themekey_css_help in themekey_css/themekey_css.module
Implements hook_help().
themekey_help in ./themekey.module
Implements hook_help().
themekey_redirect_help in themekey_redirect/themekey_redirect.module
Implements hook_help().

File

./themekey_help.inc, line 241
Provides content for help pages.

Code

function themekey_help_properties_form($form, &$form_state, $collapsed) {
  module_load_include('inc', 'themekey', 'themekey_admin');
  $page_cache_support_desriptions = themekey_get_page_cache_support_desriptions();
  $attributes = variable_get('themekey_attributes', array());
  $form['themekey_help_properties'] = array(
    '#type' => 'fieldset',
    '#title' => t('Properties explained'),
    '#collapsible' => TRUE,
    '#collapsed' => $collapsed,
  );
  foreach ($attributes as $property => $attribute) {
    $form['themekey_help_properties'][$property] = array(
      '#type' => 'fieldset',
      '#title' => check_plain($property),
      '#collapsible' => TRUE,
      '#collapsed' => TRUE,
    );
    if (isset($attribute['deprecated'])) {
      $form['themekey_help_properties'][$property]['deprecated'] = array(
        '#type' => 'item',
        '#title' => t('Deprecated'),
        '#markup' => isset($attribute['deprecated message']) ? $attribute['deprecated message'] : '',
      );
    }
    $form['themekey_help_properties'][$property]['item'] = array(
      '#type' => 'item',
      '#title' => t('Description'),
      '#markup' => '<div id="themekey-value-help-' . str_replace(array(
        ':',
        '_',
      ), array(
        '-',
        '-',
      ), $property) . '" style="display: none">' . htmlentities(strip_tags($attribute['description'])) . '</div>' . $attribute['description'],
    );
    $form['themekey_help_properties'][$property]['page_cache'] = array(
      '#type' => 'item',
      '#title' => t('Page Cache'),
      '#markup' => '<div id="themekey-page-cache-' . str_replace(array(
        ':',
        '_',
      ), array(
        '-',
        '-',
      ), $property) . '" style="display: none">' . theme('themekey_page_cache_icon', array(
        'page_cache_support' => $attribute['page cache'],
      )) . '</div>' . $page_cache_support_desriptions[$attribute['page cache']],
    );
  }
  return $form;
}