inlineParser = $inlineParser; } /** * Ajax action for inline translation * * @return void */ public function execute() { $translate = (array)$this->getRequest()->getPost('translate'); try { $response = $this->inlineParser->processAjaxPost($translate); } catch (\Exception $e) { $response = "{error:true,message:'" . $e->getMessage() . "'}"; } $this->getResponse()->representJson(json_encode($response)); $this->_actionFlag->set('', self::FLAG_NO_POST_DISPATCH, true); } }