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 DisableCommand extends AbstractCommand
{
/**
* {@inheritdoc}
*/
protected function configure()
parent::configure();
$this
->setName(TeroxSubscriptionBundle::COMMAND_NAMESPACE.':disable')
->setDescription('Disable a subscription');
}
protected function action(SubscriptionInterface $subscription)
$this->getManager()->disable($subscription);
$this->output->writeln(sprintf('Disabled subscription'));