/** * @brief action on found item. * @details Somebody just found an scavengerHunt item. * * @responseParam array $huntData */ public function itemFound() { $helper = new ScavengerHunt(); //$hunterId = $helper->getHunterId(); $articleTitle = $this->getVal('articleTitle', ''); $huntData = array(); if (!empty($articleTitle)) { $helper = new ScavengerHunt(); $bSuccess = $helper->markItemAsFound($articleTitle); if ($bSuccess) { $huntData = $helper->generateFullInfo(); } } $huntData['foundArticlesIndexes'] = $helper->getFoundIndexes(); $this->setVal('huntData', $huntData); }