You are here

function views_plugin_display_i18n_page::options_summary in i18n page views 6

Same name and namespace in other branches
  1. 6.0 views_plugin_display_i18n_page.inc \views_plugin_display_i18n_page::options_summary()
  2. 7 views_plugin_display_i18n_page.inc \views_plugin_display_i18n_page::options_summary()

Provide the summary for page options in the views UI.

This output is returned as an array.

File

./views_plugin_display_i18n_page.inc, line 118
Contains the i18n page display plugin.

Class

views_plugin_display_i18n_page
The plugin that handles a full page.

Code

function options_summary(&$categories, &$options) {

  // It is very important to call the parent function here:
  parent::options_summary($categories, $options);
  $categories['page'] = array(
    'title' => t('Page settings'),
  );
  $languages = locale_language_list();
  foreach ($languages as $key => $value) {
    $path = strip_tags($this
      ->get_option('path_' . $key));
    if (empty($path)) {
      $path = t('None');
    }
    if (strlen($path) > 16) {
      $path = substr($path, 0, 16) . '...';
    }
    $options['path_' . $key] = array(
      'category' => 'page',
      'title' => t('Path in %idiom', array(
        '%idiom' => $value,
      )),
      'value' => $path,
    );
  }
}