private function _searchFaction($cndBase) { $result = []; $cnd = array_merge($cndBase, [$this->createLookup()]); $factions = new FactionList($cnd); if ($data = $factions->getListviewData()) { $result = array('type' => TYPE_FACTION, 'appendix' => ' (Faction)', 'matches' => $factions->getMatches(), 'file' => FactionList::$brickFile, 'data' => $data, 'params' => []); if ($factions->getMatches() > $this->maxResults) { $result['params']['note'] = sprintf(Util::$tryNarrowingString, 'LANG.lvnote_factionsfound', $factions->getMatches(), $this->maxResults); $result['params']['_truncated'] = 1; } } return $result; }
private function _searchFaction($cndBase) { $cnd = array_merge($cndBase, [$this->createLookup()]); $factions = new FactionList($cnd); if ($data = $factions->getListviewData()) { $osInfo = [TYPE_FACTION, ' (Faction)', $factions->getMatches()]; $result['data'] = array_values($data); if ($factions->getMatches() > $this->maxResults) { $result['note'] = sprintf(Util::$tryNarrowingString, 'LANG.lvnote_factionsfound', $factions->getMatches(), $this->maxResults); $result['_truncated'] = 1; } return ['faction', $result, null, $osInfo]; } return false; }