function ctools_context::__construct
The ctools_context constructor.
Parameters
string $type: The type name of this context. Should be unique. Use the machine_name conventions: lowercase, short, underscores and no spaces.
mixed $data: The data payload, if required for this context.
File
-
includes/
context.inc, line 108
Class
- ctools_context
- The context object is largely a wrapper around some other object, with an interface to finding out what is contained and getting to both the object and information about the object.
Code
public function __construct($type = 'none', $data = NULL) {
$this->type = $type;
$this->data = $data;
$this->title = t('Unknown context');
$this->page_title = '';
$this->identifier = '';
$this->keyword = '';
$this->restrictions = array();
$this->empty = FALSE;
// Other vars are NULL.
}