public function getState($key = null, $default = null, $filter_type = 'raw')
{
if (empty($key)) {
return $this->internal_getState();
}
// Get the savestate status
$value = $this->internal_getState($key);
// Value is not found in the internal state
if (is_null($value)) {
// Can I fetch it from the request?
if (!$this->_ignoreRequest) {
$value = $this->container->platform->getUserStateFromRequest($this->getHash() . $key, $key, $this->input, $value, 'none', $this->_savestate);
// Did I get any useful value from the request?
if (is_null($value)) {
return $default;
}
} else {
return $default;
}
}
if (strtoupper($filter_type) == 'RAW') {
return $value;
} else {
$filter = new \JFilterInput();
return $filter->clean($value, $filter_type);
}
}