function ctools_context_string_convert

Convert a context into a string.

1 string reference to 'ctools_context_string_convert'
string.inc in plugins/contexts/string.inc
Plugin to provide a string context.

File

plugins/contexts/string.inc, line 58

Code

function ctools_context_string_convert($context, $type) {
    switch ($type) {
        case 'raw':
            return $context->data;
        case 'html_safe':
            return check_plain($context->data);
        case 'uppercase_words_html_safe':
            return ucwords(str_replace('-', ' ', check_plain($context->data)));
    }
}