Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Pôle IS
Bundles Symfony 2
plantuml-bundle
Commits
ba187cf5
Commit
ba187cf5
authored
Jul 04, 2019
by
Guillaume Perréal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ajout d'une commande pour lister les graphes configurés.
parent
5ef6f6b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
73 additions
and
0 deletions
+73
-0
src/Command/ListCommand.php
src/Command/ListCommand.php
+64
-0
src/Resources/config/services.yml
src/Resources/config/services.yml
+9
-0
No files found.
src/Command/ListCommand.php
0 → 100644
View file @
ba187cf5
<?php
declare
(
strict_types
=
1
);
/**
* Copyright (C) 2019 IRSTEA
* All rights reserved.
*
* @copyright 2019 IRSTEA
* @author guillaume.perreal
*/
namespace
Irstea\PlantUmlBundle\Command
;
use
Symfony\Component\Console\Command\Command
;
use
Symfony\Component\Console\Input\InputInterface
;
use
Symfony\Component\Console\Output\OutputInterface
;
/**
* Class ListCommand
*/
class
ListCommand
extends
Command
{
/**
* @var string
*/
private
const
CMD_NAME
=
'irstea:plantuml:list'
;
/**
* @var string[]
*/
private
$graphNames
;
/**
* ListCommand constructor.
* @param string[] $graphNames
*/
public
function
__construct
(
array
$graphNames
)
{
parent
::
__construct
(
self
::
CMD_NAME
);
$this
->
graphNames
=
$graphNames
;
}
/**
* {@inheritDoc}
*/
protected
function
configure
()
{
$this
->
setName
(
self
::
CMD_NAME
)
->
setDescription
(
'Liste les graphes PlantUML configurés.'
);
}
/**
* {@inheritDoc}
*/
protected
function
execute
(
InputInterface
$input
,
OutputInterface
$output
)
{
foreach
(
$this
->
graphNames
as
$name
)
{
$output
->
writeln
(
$name
);
}
return
0
;
}
}
src/Resources/config/services.yml
View file @
ba187cf5
...
...
@@ -90,3 +90,12 @@ services:
public
:
false
tags
:
-
{
name
:
console.command
}
irstea.plant_uml.command.list
:
class
:
Irstea\PlantUmlBundle\Command\ListCommand
lazy
:
true
public
:
false
tags
:
-
{
name
:
console.command
}
arguments
:
-
'
%irstea_plant_uml.graph_keys%'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment