function ContextConditionBreakpoint::condition_values in Context Breakpoint 7
Condition values.
Overrides context_condition::condition_values
1 call to ContextConditionBreakpoint::condition_values()
- ContextConditionBreakpoint::condition_form in plugins/
context_condition_breakpoint.inc - Condition form.
File
- plugins/
context_condition_breakpoint.inc, line 197 - context_condition_resolution.inc Provides the context CTools plugin base class.
Class
- ContextConditionBreakpoint
- @file context_condition_resolution.inc Provides the context CTools plugin base class.
Code
function condition_values() {
$breakpoints = array();
foreach (breakpoints_breakpoint_group_load_all() as $group) {
$valid = true;
$point_names = array();
foreach ($group->breakpoints as $breakpoint) {
$point = breakpoints_breakpoint_load_by_fullkey($breakpoint);
if (!$this
->parseBreakpoint($point->breakpoint)) {
$valid = false;
break;
}
$point_names[] = $point->name;
}
if ($valid) {
$name = t('Group: ') . $group->name . ' | ' . implode(',', $point_names);
$breakpoints['group_' . $group->machine_name] = $name;
}
}
foreach (breakpoints_breakpoint_load_all() as $point) {
if ($this
->parseBreakpoint($point->breakpoint)) {
$breakpoints[$point->machine_name] = $point->name . ' | ' . $point->breakpoint;
}
}
return $breakpoints;
}