function ctools_path_visibility_ctools_access_summary

Provide a summary description.

1 string reference to 'ctools_path_visibility_ctools_access_summary'
path_visibility.inc in plugins/access/path_visibility.inc

File

plugins/access/path_visibility.inc, line 75

Code

function ctools_path_visibility_ctools_access_summary($conf, $context) {
    $paths = array();
    foreach (explode("\n", $conf['paths']) as $path) {
        $paths[] = check_plain($path);
    }
    $identifier = $context->type == 'any' ? t('Current path') : $context->identifier;
    if ($conf['visibility_setting']) {
        return format_plural(count($paths), '@identifier is "@paths"', '@identifier type is one of "@paths"', array(
            '@paths' => implode(', ', $paths),
            '@identifier' => $identifier,
        ));
    }
    else {
        return format_plural(count($paths), '@identifier is not "@paths"', '@identifier type is not one of "@paths"', array(
            '@paths' => implode(', ', $paths),
            '@identifier' => $identifier,
        ));
    }
}