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\Object |
---|---|
Implements | yii\base\Configurable, yii\base\ViewContextInterface |
Subclasses | yii\apidoc\templates\bootstrap\ApiRenderer, yii\apidoc\templates\online\ApiRenderer |
Available since version | 2.0 |
Source Code | https://github.com/yiisoft/yii2-apidoc/blob/master/templates/html/ApiRenderer.php |
The base class for HTML API documentation renderers.
Public Properties
Public Methods
Protected 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
Constant | Value | Description | Defined By |
---|---|---|---|
GUIDE_PREFIX | 'guide-' | 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
mixed generateApiUrl( $typeName ) | ||
$typeName |
Generates file name for API page for a given type
string generateFileName( $typeName ) | ||
$typeName | string |
Generate link markup
mixed generateLink( $text, $href, $options = [] ) | ||
$text | ||
$href | ||
$options | array | Additional HTML attributes for the link. |
void getSourceUrl( $type, $line = null ) | ||
$type | ||
$line |
yii\web\View getView( ) | ||
return | yii\web\View | The view instance |
---|
string getViewPath( ) | ||
return | string | The view path that may be prefixed to a relative view name. |
---|
void init( ) |
Renders a given yii\apidoc\models\Context.
void render( $context, $targetDir ) | ||
$context | yii\apidoc\models\Context | The api documentation context to render. |
$targetDir |
string renderClasses( $names ) | ||
$names | array |
string renderInheritance( $class ) | ||
$class | yii\apidoc\models\ClassDoc |
string renderInterfaces( $names ) | ||
$names | array |
string renderMethodSignature( $method ) | ||
$method | yii\apidoc\models\MethodDoc |
string renderPropertySignature( $property ) | ||
$property | yii\apidoc\models\PropertyDoc |
string renderTraits( $names ) | ||
$names | array |
Renders file applying layout
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. |