function ctools_context_create_string in Chaos Tool Suite (ctools) 6
Same name and namespace in other branches
- 7 plugins/contexts/string.inc \ctools_context_create_string()
It's important to remember that $conf is optional here, because contexts are not always created from the UI.
1 string reference to 'ctools_context_create_string'
- string.inc in plugins/
contexts/ string.inc - Plugin to provide a string context
File
- plugins/
contexts/ string.inc, line 35 - Plugin to provide a string context
Code
function ctools_context_create_string($empty, $data = NULL, $conf = FALSE) {
// The input is expected to be an object as created by ctools_break_phrase
// which contains a group of string.
$context = new ctools_context('string');
$context->plugin = 'string';
if ($empty) {
return $context;
}
if ($data !== FALSE) {
$context->data = $data;
$context->title = check_plain($data);
return $context;
}
}