Commit c9895044 by Qiang Xue

Allow customizing GuideRenderer::apiUrl [skip ci]

parent 3090d280
......@@ -55,7 +55,9 @@ class GuideController extends BaseController
// setup reference to apidoc
if ($this->apiDocs !== null) {
$path = $this->apiDocs;
if ($renderer->apiUrl === null) {
$renderer->apiUrl = $path;
}
// use relative paths relative to targetDir
if (strncmp($path, '.', 1) === 0) {
$renderer->apiContext = $this->loadContext("$targetDir/$path");
......@@ -63,7 +65,9 @@ class GuideController extends BaseController
$renderer->apiContext = $this->loadContext($path);
}
} elseif (file_exists($targetDir . '/cache/apidoc.data')) {
if ($renderer->apiUrl === null) {
$renderer->apiUrl = './';
}
$renderer->apiContext = $this->loadContext($targetDir);
} else {
$renderer->apiContext = new Context();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment