/** * @inheritDoc IElementAction::performAction() * * @param ElementCriteriaModel $criteria * * @return bool */ public function performAction(ElementCriteriaModel $criteria) { craft()->httpSession->add('__exportJob', $criteria->getAttributes()); $this->setMessage($this->getParams()->successMessage); craft()->templates->includeJs(' var exportUrl = Craft.getActionUrl("sproutEmail/defaultMailer/export"); setTimeout(function() { window.location=exportUrl; }, 1500); '); return true; }
/** * Dump details about the ElementCriteriaModel * that our query is built upon. */ public function showCriteria() { Craft::dd($this->criteria->getAttributes()); }