protected function createIndexerResult($message) { // Convert the item to a result object. $item = new FinderIndexerResult(); $item->id = $message->id; $item->catid = $message->catid; // Set title context. $item->title = $message->subject; // Build the necessary url, route, path and alias information. $item->url = $this->getUrl($message->id, $this->extension, $this->layout); $item->route = $item->url . '&Itemid=' . KunenaRoute::getItemId($item->url); $item->path = FinderIndexerHelper::getContentPath($item->url); //route); $item->alias = KunenaRoute::stringURLSafe($message->subject); // Set body context. $item->body = KunenaHtmlParser::stripBBCode($message->message); $item->summary = $item->body; // Set other information. $item->published = intval($message->hold == 0); // TODO: add topic state //$item->state = intval($message->getCategory()->published == 1); $item->state = $item->published; $item->language = '*'; // TODO: add access control $item->access = $this->getAccessLevel($item); // Set the item type. $item->type_id = $this->type_id; // Set the mime type. $item->mime = $this->mime; // Set the item layout. $item->layout = $this->layout; return $item; }