private function _searchPet($cndBase) { $result = []; $cnd = array_merge($cndBase, [$this->createLookup()]); $pets = new PetList($cnd); if ($data = $pets->getListviewData()) { if ($this->searchMask & SEARCH_TYPE_OPEN) { foreach ($pets->iterate() as $__) { $data[$pets->id]['param1'] = $pets->getField('iconString'); } } $result = array('type' => TYPE_PET, 'appendix' => ' (Pet)', 'matches' => $pets->getMatches(), 'file' => PetList::$brickFile, 'data' => $data, 'params' => []); if ($pets->getMatches() > $this->maxResults) { $result['params']['note'] = sprintf(Util::$tryNarrowingString, 'LANG.lvnote_petsfound', $pets->getMatches(), $this->maxResults); $result['params']['_truncated'] = 1; } } return $result; }
private function _searchPet($cndBase) { $cnd = array_merge($cndBase, [$this->createLookup()]); $pets = new PetList($cnd); if ($data = $pets->getListviewData()) { $osInfo = [TYPE_PET, ' (Pet)', $pets->getMatches(), []]; $result = array('data' => array_values($data), 'computeDataFunc' => '$_'); if ($this->searchMask & SEARCH_TYPE_OPEN) { foreach ($pets->iterate() as $id => $__) { $osInfo[3][$id] = $pets->getField('iconString'); } } if ($pets->getMatches() > $this->maxResults) { $result['note'] = sprintf(Util::$tryNarrowingString, 'LANG.lvnote_petsfound', $pets->getMatches(), $this->maxResults); $result['_truncated'] = 1; } return ['pet', $result, 'petFoodCol', $osInfo]; } return false; }