Class yii\apidoc\templates\json\ApiRenderer
Inheritance | yii\apidoc\templates\json\ApiRenderer » yii\apidoc\renderers\ApiRenderer » yii\apidoc\renderers\BaseRenderer » yii\base\Component |
---|---|
Implements | yii\base\ViewContextInterface |
Available since version | 2.0.5 |
The class for outputting documentation data structures as a JSON text.
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$apiContext | yii\apidoc\models\Context | The yii\apidoc\models\Context currently being rendered. | yii\apidoc\renderers\BaseRenderer |
$apiUrl | yii\apidoc\renderers\BaseRenderer | ||
$controller | \yii\console\Controller | The apidoc controller instance. | yii\apidoc\renderers\BaseRenderer |
$guidePrefix | yii\apidoc\renderers\BaseRenderer | ||
$guideUrl | yii\apidoc\renderers\BaseRenderer | ||
$pageTitle | string | String to use as the title of the generated page. | yii\apidoc\renderers\BaseRenderer |
Public Methods
Method | Description | Defined By |
---|---|---|
createSubjectLink() | Creates a link to a subject | yii\apidoc\renderers\BaseRenderer |
createTypeLink() | Creates a link to a type (class, interface or trait) | yii\apidoc\renderers\BaseRenderer |
generateApiUrl() | Generate an url to a type in apidocs | yii\apidoc\templates\json\ApiRenderer |
generateGuideUrl() | Generate an url to a guide page | yii\apidoc\renderers\BaseRenderer |
getSourceUrl() | yii\apidoc\templates\json\ApiRenderer | |
getViewPath() | yii\apidoc\templates\json\ApiRenderer | |
init() | yii\apidoc\renderers\BaseRenderer | |
render() | Writes a given yii\apidoc\models\Context as JSON text to file 'types.json'. | yii\apidoc\templates\json\ApiRenderer |
Protected Methods
Method | Description | Defined By |
---|---|---|
generateFileName() | yii\apidoc\templates\json\ApiRenderer | |
generateLink() | Generate link markup | yii\apidoc\templates\json\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 |
Method Details
Generate an url to a type in apidocs
public mixed generateApiUrl ( $typeName ) | ||
$typeName |
protected void generateFileName ( $typeName ) | ||
$typeName |
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 void getViewPath ( ) |
Writes a given yii\apidoc\models\Context as JSON text to file 'types.json'.
public void render ( $context, $targetDir ) | ||
$context | yii\apidoc\models\Context | The api documentation context to render. |
$targetDir |