Abstract Class yii\apidoc\renderers\BaseRenderer
Base class for all documentation renderers
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\renderers\BaseRenderer |
generateGuideUrl() | Generate an url to a guide page | yii\apidoc\renderers\BaseRenderer |
init() | yii\apidoc\renderers\BaseRenderer |
Protected Methods
Method | Description | Defined By |
---|---|---|
generateLink() | Generate link markup | yii\apidoc\renderers\BaseRenderer |
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
The yii\apidoc\models\Context currently being rendered.
The apidoc controller instance. Can be used to control output.
String to use as the title of the generated page.
Method Details
Creates a link to a subject
public string createSubjectLink ( $subject, $title = null, $options = [] ) | ||
$subject | yii\apidoc\models\PropertyDoc|yii\apidoc\models\MethodDoc|yii\apidoc\models\ConstDoc|yii\apidoc\models\EventDoc | |
$title | string | |
$options | array | Additional HTML attributes for the link. |
Creates a link to a type (class, interface or trait)
public string createTypeLink ( $types, $context = null, $title = null, $options = [] ) | ||
$types | yii\apidoc\models\ClassDoc|yii\apidoc\models\InterfaceDoc|yii\apidoc\models\TraitDoc|yii\apidoc\models\ClassDoc[]|yii\apidoc\models\InterfaceDoc[]|yii\apidoc\models\TraitDoc[]|string|string[] | |
$context | yii\apidoc\models\BaseDoc | |
$title | string | A title to be used for the link TODO check whether [[yii...|Class]] is supported |
$options | array | Additional HTML attributes for the link. |
Generate an url to a type in apidocs
public abstract mixed generateApiUrl ( $typeName ) | ||
$typeName |
Generate an url to a guide page
public string generateGuideUrl ( $file ) | ||
$file | string |
Generate link markup
protected abstract mixed generateLink ( $text, $href, $options = [] ) | ||
$text | ||
$href | ||
$options | array | Additional HTML attributes for the link. |
public void init ( ) |