Final Class Yiisoft\Yii\Gii\ParametersProvider
| Inheritance | Yiisoft\Yii\Gii\ParametersProvider |
|---|
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\Yii\Gii\ParametersProvider | |
| getTemplates() | Yiisoft\Yii\Gii\ParametersProvider |
Method Details
| public mixed __construct ( array $templates = [] ) | ||
| $templates | array | |
public function __construct(
/**
* @var array<string, array<string, string>> a list of available code templates. The array keys are the template names,
* and the array values are the corresponding template paths or path aliases.
*/
private readonly array $templates = [],
) {
}
| public array getTemplates ( string $generator ) | ||
| $generator | string | |
public function getTemplates(string $generator): array
{
$templates = $this->templates[$generator] ?? [];
return ['default' => 'true', ...$templates];
}
Signup or Login in order to comment.