function panels_context::is_type in Panels 6.2
Same name and namespace in other branches
- 5.2 includes/plugins.inc \panels_context::is_type()
File
- includes/
plugins.inc, line 33 - plugins.inc
Class
- panels_context
- Forms the basis for describing and storing a context that a display might be running in.
Code
function is_type($type) {
if ($type == 'any' || $this->type == 'any') {
return TRUE;
}
$a = is_array($type) ? $type : array(
$type,
);
$b = is_array($this->type) ? $this->type : array(
$this->type,
);
return (bool) array_intersect($a, $b);
}