function ctools_site_language_ctools_access_summary

Provide a summary description based upon the checked site_languages.

1 string reference to 'ctools_site_language_ctools_access_summary'
site_language.inc in plugins/access/site_language.inc
Plugin to provide access control based upon node type.

File

plugins/access/site_language.inc, line 66

Code

function ctools_site_language_ctools_access_summary($conf, $context) {
    $languages = array(
        'default' => t('Default site language'),
    );
    $languages = array_merge($languages, locale_language_list());
    if (!isset($conf['language'])) {
        $conf['language'] = array();
    }
    $names = array();
    foreach (array_filter($conf['language']) as $language) {
        $names[] = $languages[$language];
    }
    if (empty($names)) {
        return t('Site language is any language');
    }
    return format_plural(count($names), 'Site language is "@languages"', 'Site language is one of "@languages"', array(
        '@languages' => implode(', ', $names),
    ));
}