}> */ public function getAllGroupsAndLinks(): array { $entries = $this->getFromCache(); if (is_null($entries)) { $fname = $this->getLocalizedFile('links.yaml'); $parsedData = Yaml::parseFile($fname); $entries = []; foreach ($parsedData as $value) { /* Get all links. */ $links = []; foreach ($value['links'] as $data) { $links[] = new WebLink($data); } $entries[] = [ 'name' => $value['name'], 'notes' => $value['notes'], 'links' => $links, ]; } $this->saveToCache($entries); } return $entries; } }