Joomla checkin() Method of Admin Controller

Admin Controller
Joomla checkin() Method of Admin Controller

This function is used to check-in of one or more records.

  • return boolean - True on success
public function checkin()
{
// Check for request forgeries.
$this->checkToken();

$ids = $this->input->post->get('cid', array(), 'array');

$model = $this->getModel();
$return = $model->checkin($ids);

if ($return === false)
{
// Checkin failed.
$message = \JText::sprintf('JLIB_APPLICATION_ERROR_CHECKIN_FAILED', $model->getError());
$this->setRedirect(\JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list, false), $message, 'error');

return false;
}
else
{
// Checkin succeeded.
$message = \JText::plural($this->text_prefix . '_N_ITEMS_CHECKED_IN', count($ids));
$this->setRedirect(\JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list, false), $message);

return true;
}
}

 

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive