/** * @param string|null $locale * @return Release[] */ function getReleases($locale = null) { if (empty($locale)) { $locale = $this->project->getDefaultLocale(); } $files = call_user_func($this->finders['findReleaseFiles'], $this->getReleasesPath($locale), $locale); $result = []; foreach ($files as $version_number => $file) { $release = new Release($this->project, $version_number, $file, true); if ($release->isLoaded()) { $result[$release->getVersionNumber()] = $release; } } return $result; }
/** * Return book page URL * * @param string $book_name * @param string $page_slug * @return string */ private static function getBookPageUrl($book_name, $page_slug) { return self::pageLevelToPrefix(self::$current_element->getPageLevel()) . 'books/' . $book_name . '/' . $page_slug . '.html'; }