/**
* Method to add a record ID to 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 holdEditId($context, $id)
{
$values = (array) $this->app->getUserState($context . '.id');
// Add the id to the list if non-zero.
if (!empty($id)) {
$values[] = (int) $id;
$values = array_unique($values);
$this->app->setUserState($context . '.id', $values);
if (\defined('JDEBUG') && JDEBUG) {
$this->app->getLogger()->info(sprintf('Holding edit ID %s.%s %s', $context, $id, str_replace("\n", ' ', print_r($values, 1))), array('category' => 'controller'));
}
}
}