/**
* Method to check whether an ID is in the edit list.
*
* @param string $context The context for the session storage.
* @param integer $id The ID of the record to add to the edit list.
*
* @return void
*
* @since 3.0
*/
protected function releaseEditId($context, $id)
{
$values = (array) $this->app->getUserState($context . '.id');
// Do a strict search of the edit list values.
$index = array_search((int) $id, $values, true);
if (\is_int($index)) {
unset($values[$index]);
$this->app->setUserState($context . '.id', $values);
if (\defined('JDEBUG') && JDEBUG) {
$this->app->getLogger()->info(sprintf('Releasing edit ID %s.%s %s', $context, $id, str_replace("\n", ' ', print_r($values, 1))), array('category' => 'controller'));
}
}
}