Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mathieu
potage
Commits
400392d2
Commit
400392d2
authored
Jul 25, 2018
by
Mat
Browse files
hop
parent
c59b15b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/PotageBundle/Command/CronOffreCommand.php
View file @
400392d2
...
@@ -41,16 +41,12 @@ class CronOffreCommand extends ContainerAwareCommand
...
@@ -41,16 +41,12 @@ class CronOffreCommand extends ContainerAwareCommand
*/
*/
foreach
(
$currentOffre
as
$offre
)
foreach
(
$currentOffre
as
$offre
)
{
{
if
(
$offre
->
getEndedAt
()
>=
$now
)
{
if
(
$offre
->
getEndedAt
()
<=
$now
)
{
//$output->writeln($offre->getReference() . ': offre toujours en cours');
}
else
{
$output
->
writeln
(
$offre
->
getReference
()
.
': offre expirée, on archive..'
);
$output
->
writeln
(
$offre
->
getReference
()
.
': offre expirée, on archive..'
);
$offre
->
setStatus
(
'closed'
);
$offre
->
setStatus
(
'closed'
);
// TODO envoyer un mail au gestionnaire pour
annonc
er l'expiration de l'offre
// TODO envoyer un mail au gestionnaire pour
notifi
er l'expiration de l'offre
}
}
}
}
$em
->
flush
();
$em
->
flush
();
...
...
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