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 |
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-' | 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. |