Sf TIC Bundles

TICCommand extends Command
in package
Uses ContextProperties

AbstractYes

Base Command

Tags
see
https://symfony.com/doc/current/console.html
see
https://symfony.com/doc/current/components/console.html

$output

  • verbosity : ->isQuiet(), ->isVerbose(), ->isVeryVerbose(), ->isDebug()
  • clickable : ->writeln('<href=https://symfony.com>Symfony Homepage</>');
  • style tags : '' '' '' ''
  • color tags : '<fg=green>' '<bg=black;fg=#c0392b>' '<bg=yellow;options=bold,underscore>'

$io (style) ->title(),->section(), ->text(), ->listing(), ->table(), ->horizontalTable(), ->definitionList() ->note(), ->caution(), ->info(), ->warning(), ->error(), ->success() ->ask(), ->askHidden(), ->confirm(), ->choice()

Table of Contents

Properties

$ctxBundle  : mixed
nom du sous-dossier du controlleur (ex: '', 'Admin', 'Front', ...)
$ctxClass  : mixed
$ctxForm  : mixed
nom dans les tokens génériques (ex: 'item', 'user', 'book", 'foobar')
$ctxMesg  : mixed
préfixe utilisé pour les tokens (ex: 'app.foobar.', 'admin.foobar.', 'ticdemo.foobar.')
$ctxName  : mixed
espace de nommage de base du bundle (ex: 'App', 'TIC\DemoBundle')
$ctxPath  : mixed
nom du controlleur en camel case (ex: 'Default', 'User', 'Book', 'FooBar', ...)
$ctxRoot  : mixed
type de la classe courante (ex: 'Controller', 'Command')
$ctxRoute  : mixed
nom du controlleur en snake case (ex: 'default', 'book', 'foo_bar')
$ctxSnake  : mixed
alias du bundle pour repo, views... (ex: null, '@TICDemo')
$ctxTrans  : mixed
préfixe utilisé pour les routes (ex: 'app_foobar_', 'admin_foobar_', 'ticdemo_foobar_')
$ctxType  : mixed
nom complet de la classe courante (ex: 'App\Controller\Admin\FooBarController')
$defaultDescription  : mixed
$defaultName  : mixed
$io  : mixed
$out  : mixed
$params  : mixed
$router  : mixed
$test  : mixed
$translator  : mixed

Methods

__construct()  : mixed
{@inheritDoc}
setContextProperties()  : void
DI avec auto-wiring (inutile de définir le "call" sur le service grace à l'attribut @required).
configure()  : void
{@inheritDoc}
execute()  : int
{@inheritDoc}
exitError()  : mixed
Méthode utile pour afficher un message d'erreur, suivi du synopsis de la commande, puis exit 1.
getContextProperties()  : array<string|int, mixed>
Retourne la liste des propriétés définies dans un tableaux (utile pour du debug).
initialize()  : mixed
{@inheritDoc}
isAlreadyRunning()  : bool|null
Méthode testant si un autre processus pour la même commande est déjà en cours d'exécution.
trans()  : string

Properties

$ctxBundle

nom du sous-dossier du controlleur (ex: '', 'Admin', 'Front', ...)

protected mixed $ctxBundle

$ctxForm

nom dans les tokens génériques (ex: 'item', 'user', 'book", 'foobar')

protected mixed $ctxForm

$ctxMesg

préfixe utilisé pour les tokens (ex: 'app.foobar.', 'admin.foobar.', 'ticdemo.foobar.')

protected mixed $ctxMesg = 'item'

$ctxName

espace de nommage de base du bundle (ex: 'App', 'TIC\DemoBundle')

protected mixed $ctxName

$ctxPath

nom du controlleur en camel case (ex: 'Default', 'User', 'Book', 'FooBar', ...)

protected mixed $ctxPath

$ctxRoot

type de la classe courante (ex: 'Controller', 'Command')

protected mixed $ctxRoot

$ctxRoute

nom du controlleur en snake case (ex: 'default', 'book', 'foo_bar')

protected mixed $ctxRoute

$ctxSnake

alias du bundle pour repo, views... (ex: null, '@TICDemo')

protected mixed $ctxSnake

$ctxTrans

préfixe utilisé pour les routes (ex: 'app_foobar_', 'admin_foobar_', 'ticdemo_foobar_')

protected mixed $ctxTrans

$ctxType

nom complet de la classe courante (ex: 'App\Controller\Admin\FooBarController')

protected mixed $ctxType

$defaultDescription

protected static mixed $defaultDescription = null

$defaultName

protected static mixed $defaultName = null

Methods

__construct()

{@inheritDoc}

public __construct(RouterInterface $router, TranslatorInterface $translator, ParameterBagInterface $params) : mixed
Parameters
$router : RouterInterface
$translator : TranslatorInterface
$params : ParameterBagInterface

setContextProperties()

DI avec auto-wiring (inutile de définir le "call" sur le service grace à l'attribut @required).

public setContextProperties([string|null $classType = null ]) : void
Parameters
$classType : string|null = null
Tags
see
https://symfony.com/doc/current/service_container/injection_types.html#setter-injection
see
https://symfony.com/doc/current/service_container/autowiring.html#autowiring-other-methods-e-g-setters-and-public-typed-properties
required

configure()

{@inheritDoc}

protected configure() : void

execute()

{@inheritDoc}

protected execute(InputInterface $input, OutputInterface $output) : int
Parameters
$input : InputInterface
$output : OutputInterface
Return values
int

exitError()

Méthode utile pour afficher un message d'erreur, suivi du synopsis de la commande, puis exit 1.

protected exitError(string $message[, int $code = 1 ]) : mixed
Parameters
$message : string
$code : int = 1

getContextProperties()

Retourne la liste des propriétés définies dans un tableaux (utile pour du debug).

protected getContextProperties() : array<string|int, mixed>
Return values
array<string|int, mixed>

initialize()

{@inheritDoc}

protected initialize(InputInterface $input, OutputInterface $output) : mixed
Parameters
$input : InputInterface
$output : OutputInterface

trans()

protected trans(string $token[, array<string|int, mixed> $parameters = [] ]) : string
Parameters
$token : string
$parameters : array<string|int, mixed> = []
Return values
string

        
On this page

Search results