Created
June 21, 2011 04:42
-
-
Save mbabker/1037259 to your computer and use it in GitHub Desktop.
Batch Processing Boilerplate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Method to run batch operations. | |
* | |
* @return void | |
* @since 1.7 | |
*/ | |
public function batch($model) | |
{ | |
JRequest::checkToken() or jexit(JText::_('JINVALID_TOKEN')); | |
// Set the model | |
$model = $this->getModel('Article', '', array()); | |
// Preset the redirect | |
$this->setRedirect(JRoute::_('index.php?option=com_content&view=articles'.$this->getRedirectToListAppend(), false)); | |
return parent::batch($model); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment