Class yii\apidoc\templates\html\ApiRenderer
| Inheritance | yii\apidoc\templates\html\ApiRenderer » yii\apidoc\renderers\ApiRenderer » yii\apidoc\renderers\BaseRenderer » yii\base\Component » yii\base\BaseObject |
|---|---|
| Implements | yii\base\Configurable, yii\base\ViewContextInterface |
| Subclasses | yii\apidoc\templates\bootstrap\ApiRenderer, yii\apidoc\templates\online\ApiRenderer |
| Available since version | 2.0 |
The base class for HTML API documentation renderers.
Public Properties
隐藏继承的属性 Hide inherited properties
Public Methods
隐藏继承的方法 Hide inherited methods
Protected Methods
隐藏继承的方法 Hide inherited methods
| 方法 Method | 简介 Description | 定义在 Defined By |
|---|---|---|
| generateFileName() | Generates file name for API page for a given type | yii\apidoc\templates\html\ApiRenderer |
| generateLink() | Generate link markup | yii\apidoc\templates\html\ApiRenderer |
| renderWithLayout() | Renders file applying layout | yii\apidoc\templates\html\ApiRenderer |
常量 Constants
隐藏继承的常量 Hide inherited constants
| 常量 Constant | 值 Value | 简介 Description | 定义在 Defined By |
|---|---|---|---|
| GUIDE_PREFIX | 'guide-' | Deprecated since 2.0.1 use $guidePrefix instead which allows configuring this options | yii\apidoc\renderers\BaseRenderer |
属性详情 Property Details
Path or alias of the view file to use for rendering the index page.
Path or alias of the layout file to use.
Path or alias of the view file to use for rendering types (classes, interfaces, traits).
The view instance
The view path that may be prefixed to a relative view name.
方法详情 Method Details
Generate an url to a type in apidocs
| public mixed generateApiUrl ( $typeName ) | ||
| $typeName | ||
Generates file name for API page for a given type
| protected string generateFileName ( $typeName ) | ||
| $typeName | string | |
Generate link markup
| protected mixed generateLink ( $text, $href, $options = [] ) | ||
| $text | ||
| $href | ||
| $options | array | Additional HTML attributes for the link. |
| public void getSourceUrl ( $type, $line = null ) | ||
| $type | ||
| $line | ||
| public yii\web\View getView ( ) | ||
| return | yii\web\View | The view instance |
|---|---|---|
| public string getViewPath ( ) | ||
| return | string | The view path that may be prefixed to a relative view name. |
|---|---|---|
| public void init ( ) |
Renders a given yii\apidoc\models\Context.
| public void render ( $context, $targetDir ) | ||
| $context | yii\apidoc\models\Context | The api documentation context to render. |
| $targetDir | string | |
| public string renderClasses ( $names ) | ||
| $names | array | |
Renders the default value.
| public string renderDefaultValue ( $value ) | ||
| $value | mixed | |
| public string renderInheritance ( $class ) | ||
| $class | yii\apidoc\models\ClassDoc | |
| public string renderInterfaces ( $names ) | ||
| $names | array | |
| public string renderMethodSignature ( $method, $context = null ) | ||
| $method | yii\apidoc\models\MethodDoc | |
| $context | ||
| public string renderPropertySignature ( $property, $context = null ) | ||
| $property | yii\apidoc\models\PropertyDoc | |
| $context | mixed | |
| public string renderTraits ( $names ) | ||
| $names | array | |
Renders file applying layout
| protected string renderWithLayout ( $viewFile, $params ) | ||
| $viewFile | string | The view name |
| $params | array | The parameters (name-value pairs) that will be extracted and made available in the view file. |