class panels_context in Panels 6.2
Same name and namespace in other branches
- 5.2 includes/plugins.inc \panels_context
Forms the basis for describing and storing a context that a display might be running in.
Hierarchy
- class \panels_context
Expanded class hierarchy of panels_context
1 string reference to 'panels_context'
- _panels_page_construct_argument_contexts in panels_page/
panels_page.module - Extracts context data from provided URLs; helper function for _panels_page_master_loader().
File
- includes/
plugins.inc, line 14 - plugins.inc
View source
class panels_context {
var $type = NULL;
var $data = NULL;
// The title of this object.
var $title = '';
// The title of the page if this object exists
var $page_title = '';
// The identifier (in the UI) of this object
var $identifier = '';
var $argument = NULL;
var $keyword = '';
var $original_argument = NULL;
function panels_context($type = 'none', $data = NULL) {
$this->type = $type;
$this->data = $data;
$this->title = t('Unknown context');
}
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);
}
function get_argument() {
return $this->argument;
}
function get_original_argument() {
if (!is_null($this->original_argument)) {
return $this->original_argument;
}
return $this->argument;
}
function get_keyword() {
return $this->keyword;
}
function get_identifier() {
return $this->identifier;
}
function get_title() {
return $this->title;
}
function get_page_title() {
return $this->page_title;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
panels_context:: |
property | |||
panels_context:: |
property | |||
panels_context:: |
property | |||
panels_context:: |
property | |||
panels_context:: |
property | |||
panels_context:: |
property | |||
panels_context:: |
property | |||
panels_context:: |
property | |||
panels_context:: |
function | |||
panels_context:: |
function | |||
panels_context:: |
function | |||
panels_context:: |
function | |||
panels_context:: |
function | |||
panels_context:: |
function | |||
panels_context:: |
function | |||
panels_context:: |
function |