You are here

function datex_date_field_formatter_settings_summary_alter in Datex 7.2

Same name and namespace in other branches
  1. 7.3 datex_date.inc \datex_date_field_formatter_settings_summary_alter()

implements hook_date_field_formatter_settings_summary_alter().

File

./datex_date.inc, line 326
Provides Jalali support for date module.

Code

function datex_date_field_formatter_settings_summary_alter(&$summary, $context) {
  if (!_datex_date_granularities_supported($context['field']['settings']['granularity'])) {
    $summary[] = t('Datex: Force disabled (Field not supported)');
  }
  else {
    $viewmode = $context['view_mode'];
    $settings = $context['instance']['display'][$viewmode]['settings'];
    if (isset($settings['datex_schema'])) {
      $settings = $settings['datex_schema'];
    }
    else {
      $settings = t('default');
    }
    $summary[] = t('Datex: @calendar', array(
      '@calendar' => $settings,
    ));
  }
}