/** * Cancel action * * This function will unlock the row(s) and set the redirect to the referrer * * Overriding Nooku Framework to stop the posibility of infinite loops * * @param KCommandContext A command context object * @return KDatabaseRow A row object containing the data of the cancelled object */ protected function _actionCancel(KCommandContext $context) { $row = parent::_actionCancel($context); $identifier = $this->getIdentifier(); //allways redirect to the plural view $this->_redirect = 'index.php?option=com_' . $identifier->package . '&view=' . KInflector::pluralize($identifier->name); return $row; }