MakeBundle
extends BaseMaker
in package
Table of Contents
Properties
- $ask : mixed
- $dependencies : mixed
- $description : mixed
- $fileManager : mixed
- $generator : mixed
- $io : mixed
- $makerName : mixed
- $over : mixed
- $skelPath : mixed
- $test : mixed
- $twig : mixed
Methods
- __construct() : mixed
- configureCommand() : mixed
- Configure the command: set description, input arguments, options, etc.
- configureDependencies() : mixed
- Configure any library dependencies that your maker requires.
- generate() : mixed
- Called after normal code generation: allows you to do anything.
- getCommandDescription() : string
- getCommandName() : string
- Return the command name for your maker (e.g. make:controller).
- setFileManager() : mixed
- Injection par call pour laisser le construct facilement surchargeable
- checkTargetPath() : bool
- confirm() : bool
- fixClassName() : string
- Pré-traitement du nom de classe passé en argument aux commandes.
- getMakerName() : string
- getRootNamespace() : string
- getSnakeCaseName() : string
- getVariablesFromName() : array<string|int, mixed>
- hash2list() : array<string|int, mixed>
- indentFile() : bool
- initTwigLayout() : void
- Génération du template twig parent (si le fichier n'existe pas déjà).
- summary() : bool
- Récapitulatif des fichiers générés
- ticConfigure() : mixed
- Configure the command: set description, input arguments, options, etc.
- ticGenerate() : mixed
- Called after normal code generation: allows you to do anything.
- ticGenerateClass() : string|null
- ticGenerateController() : string|null
- ticGenerateFormType() : string|null
- ticGenerateTemplate() : string|null
- ticGenerateTemplates() : array<string|int, mixed>
Properties
$ask
protected
mixed
$ask
= true
$dependencies
protected
mixed
$dependencies
= []
$description
protected
static mixed
$description
$fileManager
protected
mixed
$fileManager
$generator
protected
mixed
$generator
$io
protected
mixed
$io
$makerName
protected
mixed
$makerName
$over
protected
mixed
$over
= false
$skelPath
protected
static mixed
$skelPath
= __DIR__ . '/../../acme/'
$test
protected
mixed
$test
= false
$twig
protected
mixed
$twig
= true
Methods
__construct()
public
__construct() : mixed
configureCommand()
Configure the command: set description, input arguments, options, etc.
public
configureCommand(Command $command, InputConfiguration $inputConfig) : mixed
By default, all arguments will be asked interactively. If you want to avoid that, use the $inputConfig->setArgumentAsNonInteractive() method.
Parameters
- $command : Command
- $inputConfig : InputConfiguration
configureDependencies()
Configure any library dependencies that your maker requires.
public
configureDependencies(DependencyBuilder $dependencies) : mixed
Parameters
- $dependencies : DependencyBuilder
generate()
Called after normal code generation: allows you to do anything.
public
generate(InputInterface $input, ConsoleStyle $io, Generator $generator) : mixed
Parameters
- $input : InputInterface
- $io : ConsoleStyle
- $generator : Generator
getCommandDescription()
public
static getCommandDescription() : string
Return values
stringgetCommandName()
Return the command name for your maker (e.g. make:controller).
public
static getCommandName() : string
Return values
stringsetFileManager()
Injection par call pour laisser le construct facilement surchargeable
public
setFileManager(FileManager $fileManager) : mixed
Parameters
- $fileManager : FileManager
checkTargetPath()
protected
checkTargetPath(string $targetPath) : bool
Parameters
- $targetPath : string
Return values
boolconfirm()
protected
confirm(string $question) : bool
Parameters
- $question : string
Return values
boolfixClassName()
Pré-traitement du nom de classe passé en argument aux commandes.
protected
fixClassName(string $name[, bool|null $skip_path = false ]) : string
- accepte les caractères '/' et '.' en séparateur de chemin (au lieu de '')
- force une majuscule sur tous éléments du chemin du nom de classe
Parameters
- $name : string
- $skip_path : bool|null = false
Return values
stringgetMakerName()
protected
static getMakerName() : string
Return values
stringgetRootNamespace()
protected
getRootNamespace(ClassNameDetails $classNameDetails[, string|null $classFolder = null ]) : string
Parameters
- $classNameDetails : ClassNameDetails
- $classFolder : string|null = null
Return values
stringgetSnakeCaseName()
protected
getSnakeCaseName(ClassNameDetails $classNameDetails) : string
Parameters
- $classNameDetails : ClassNameDetails
Return values
stringgetVariablesFromName()
protected
getVariablesFromName(string $inputName[, string|null $type = "Controller" ]) : array<string|int, mixed>
Parameters
- $inputName : string
- $type : string|null = "Controller"
Return values
array<string|int, mixed>hash2list()
protected
static hash2list(array<string|int, mixed> $hash) : array<string|int, mixed>
Parameters
- $hash : array<string|int, mixed>
Return values
array<string|int, mixed>indentFile()
protected
static indentFile(string $file[, bool|null $with_space = false ]) : bool
Parameters
- $file : string
- $with_space : bool|null = false
Return values
boolinitTwigLayout()
Génération du template twig parent (si le fichier n'existe pas déjà).
protected
initTwigLayout(string $tpl_path[, array<string|int, mixed> $variables = [] ]) : void
Parameters
- $tpl_path : string
- $variables : array<string|int, mixed> = []
summary()
Récapitulatif des fichiers générés
protected
summary(array<string|int, mixed> $results) : bool
Parameters
- $results : array<string|int, mixed>
Return values
boolticConfigure()
Configure the command: set description, input arguments, options, etc.
protected
ticConfigure(Command $command) : mixed
Parameters
- $command : Command
ticGenerate()
Called after normal code generation: allows you to do anything.
protected
ticGenerate(InputInterface $input) : mixed
Parameters
- $input : InputInterface
ticGenerateClass()
protected
ticGenerateClass(string $className, string $templateName[, array<string|int, mixed> $variables = [] ]) : string|null
Parameters
- $className : string
- $templateName : string
- $variables : array<string|int, mixed> = []
Return values
string|nullticGenerateController()
protected
ticGenerateController(string $controllerClassName, string $controllerTemplatePath[, array<string|int, mixed> $parameters = [] ]) : string|null
Parameters
- $controllerClassName : string
- $controllerTemplatePath : string
- $parameters : array<string|int, mixed> = []
Return values
string|nullticGenerateFormType()
protected
ticGenerateFormType(FormTypeRenderer $renderer, ClassNameDetails $formDetails, EntityDetails $doctrineDetails, ClassNameDetails $entityDetails[, array<string|int, mixed> $constraintClasses = [] ][, array<string|int, mixed> $extraUseClasses = [] ]) : string|null
Parameters
- $renderer : FormTypeRenderer
- $formDetails : ClassNameDetails
- $doctrineDetails : EntityDetails
- $entityDetails : ClassNameDetails
- $constraintClasses : array<string|int, mixed> = []
- $extraUseClasses : array<string|int, mixed> = []
Return values
string|nullticGenerateTemplate()
protected
ticGenerateTemplate(string $targetPath, string $templateName[, array<string|int, mixed> $variables = [] ]) : string|null
Parameters
- $targetPath : string
- $templateName : string
- $variables : array<string|int, mixed> = []
Return values
string|nullticGenerateTemplates()
protected
ticGenerateTemplates(string $skelDir, array<string|int, mixed> $templates[, array<string|int, mixed> $variables = [] ]) : array<string|int, mixed>
Parameters
- $skelDir : string
- $templates : array<string|int, mixed>
- $variables : array<string|int, mixed> = []