for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Terox\SubscriptionBundle\Command;
use Terox\SubscriptionBundle\Model\SubscriptionInterface;
use Terox\SubscriptionBundle\TeroxSubscriptionBundle;
class ActiveCommand extends AbstractCommand
{
/**
* {@inheritdoc}
*/
protected function configure()
parent::configure();
$this
->setName(TeroxSubscriptionBundle::COMMAND_NAMESPACE.':active')
->setDescription('Active a subscription a expired/disabled subscription');
}
protected function action(SubscriptionInterface $subscription)
$this->getManager()->activate($subscription, false);
$this->output->writeln(sprintf('Activated subscription'));