/** * this function queries all logos and returns them in autocomplete */ public static function getListOfTypeLogo($parameters) { $structuredKeys = array(); $values = array(); $keys = array(); foreach (Logo::$rawLogos as $id => $array) { $object = new Logo(); $object->setId($id); $object->setCompleteLogo(); $keys[] = $id; $title = $array['alt']; $structuredKeys[$id] = array('id' => $id, 'object' => $object, 'title' => $title); $values[] = $title; } if (isset($parameters['forAutocompletion']) && $parameters['forAutocompletion']) { $a[] = $values; $a[] = $keys; return $a; } else { return $structuredKeys; } }