JStream/deleteContextEntry
From Joomla! Documentation
< API16:JStream
The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
Description[edit]
Deletes a particular setting from a context
Syntax[edit]
deleteContextEntry($wrapper, $name)
Parameter Name | Default Value | Description |
---|---|---|
$wrapper | The wrapper to use | |
$name | The option to unset |
Defined in[edit]
libraries/joomla/filesystem/stream.php
Importing[edit]
jimport( 'joomla.filesystem.stream' );
Source Body[edit]
function deleteContextEntry($wrapper, $name)
{
// check the wrapper is set
if(isset($this->_contextOptions[$wrapper]))
{
// check that entry is set for that wrapper
if(isset($this->_contextOptions[$wrapper][$name]))
{
// unset the item
unset($this->_contextOptions[$wrapper][$name]);
// check that there are still items there
if(!count($this->_contextOptions[$wrapper])) {
// clean up an empty wrapper context option
unset($this->_contextOptions[$wrapper]);
}
}
}
// rebuild the context and apply it to the stream
$this->_buildContext();
}
Examples[edit]
Code Examples[edit]