You are here

function webform_chart_schema_alter in Webform Chart 7.2

Same name and namespace in other branches
  1. 7 webform_chart.install \webform_chart_schema_alter()

Implements hook_schema_alter().

2 calls to webform_chart_schema_alter()
webform_chart_install in ./webform_chart.install
Implements hook_install().
webform_chart_uninstall in ./webform_chart.install
Implements hook_uninstall().

File

./webform_chart.install, line 13
webform_chart.install

Code

function webform_chart_schema_alter(&$schema) {

  // Add charting settings to the global webform setting.
  if (isset($schema['webform'])) {

    // Add field to existing schema.
    $schema['webform']['fields']['charting'] = array(
      'type' => 'text',
      'description' => 'Webform charting global configuration.',
    );
  }

  // Add component charting settings to component setting.
  if (isset($schema['webform_component'])) {

    // Add field to existing schema.
    $schema['webform_component']['fields']['charting'] = array(
      'type' => 'text',
      'description' => 'Charting settings for this component.',
    );
  }
}