/** * @param string $action * @param string $primary * @param string|NULL $token * @return void */ public function handleRowAction($action, $primary, $token = NULL) { $act = $this['rowActions']->getComponent($action); if (!$act->isProtected() || Helpers::checkCsrfToken($this->session, $token)) { $act->invoke(Helpers::findRecord($this->getData(), $primary, $this->getRecord())); $this->refreshState(); $this->redraw(TRUE, TRUE, ['body', 'footer']); } else { $this->flashMessage('Security token does not match. Please try again.', 'error'); $this->redirect('this'); } }