diff --git a/extensions/apidoc/composer.json b/extensions/apidoc/composer.json index e488f84483..b5a1c9edc7 100644 --- a/extensions/apidoc/composer.json +++ b/extensions/apidoc/composer.json @@ -20,6 +20,7 @@ "minimum-stability": "dev", "require": { "yiisoft/yii2": "*", + "yiisoft/yii2-bootstrap": "*", "phpdocumentor/reflection": "dev-master | >1.0.2" }, "autoload": { diff --git a/extensions/apidoc/templates/bootstrap/Renderer.php b/extensions/apidoc/templates/bootstrap/Renderer.php new file mode 100644 index 0000000000..1bb1bf5729 --- /dev/null +++ b/extensions/apidoc/templates/bootstrap/Renderer.php @@ -0,0 +1,26 @@ + + * @since 2.0 + */ +class Renderer extends \yii\apidoc\templates\html\Renderer +{ + public $layout = '@yii/apidoc/templates/bootstrap/views/bootstrap.php'; + public $indexView = '@yii/apidoc/templates/bootstrap/views/index.php'; + + public $pageTitle = 'Yii Framework 2.0 API Documentation'; +} \ No newline at end of file diff --git a/extensions/apidoc/templates/bootstrap/SideNavWidget.php b/extensions/apidoc/templates/bootstrap/SideNavWidget.php new file mode 100644 index 0000000000..2e346a2729 --- /dev/null +++ b/extensions/apidoc/templates/bootstrap/SideNavWidget.php @@ -0,0 +1,178 @@ + [ + * [ + * 'label' => 'Home', + * 'url' => ['site/index'], + * 'linkOptions' => [...], + * ], + * [ + * 'label' => 'Dropdown', + * 'items' => [ + * ['label' => 'Level 1 - Dropdown A', 'url' => '#'], + * '
', + * '| Class | +Description | +
|---|---|
| = $this->context->typeLink($class, $class->name) ?> | += \yii\apidoc\helpers\Markdown::process($class->shortDescription, $class) ?> | +
|
-
- = $this->context->renderMethodSignature($method) ?>
-
+ = $this->context->renderMethodSignature($method) ?>
|