Skip to content

Instantly share code, notes, and snippets.

@bshaffer
Created April 13, 2011 05:54
Show Gist options
  • Save bshaffer/917036 to your computer and use it in GitHub Desktop.
Save bshaffer/917036 to your computer and use it in GitHub Desktop.
Hadori: from actions.class.php...
<?php
abstract class autoSf_guard_user_oldActions extends sfActions
{
// ....
public function executeBatch(sfWebRequest $request)
{
if (!$ids = $request->getParameter('ids'))
{
$this->getUser()->setFlash('error', 'You must at least select one item.');
}
elseif (!$action = $request->getParameter('batch_action'))
{
$this->getUser()->setFlash('error', 'You must select an action to execute on the selected items.');
}
$method = sprintf('execute%s', ucfirst($action));
$this->$method($request);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment