Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Normal
[CODE=php] protected function getInput($key, $id) { if (!isset($this->filterCache[$key])) { $this->filterCache[$key] = $this->inputFilterer->filter($key, 'array'); } return !empty($this->filterCache[$key][$this->contentType][$id]) ? $this->filterCache[$key][$this->contentType][$id] : ''; }[/CODE]if the key + content type + content id combo does not exist, it just assumes the default value would be empty string. It would be nice to pass a third argument which can act as a default.
[CODE=php] protected function getInput($key, $id)
{
if (!isset($this->filterCache[$key]))
$this->filterCache[$key] = $this->inputFilterer->filter($key, 'array');
}
return !empty($this->filterCache[$key][$this->contentType][$id]) ? $this->filterCache[$key][$this->contentType][$id] : '';
}[/CODE]
if the key + content type + content id combo does not exist, it just assumes the default value would be empty string. It would be nice to pass a third argument which can act as a default.
We use essential cookies to make this site work, and optional cookies to enhance your experience.
See further information and configure your preferences