Last active
May 30, 2016 06:18
-
-
Save jmolivas/2f7539d138ca82e64870413a9d56b0bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Contains \Drupal\Console\Develop\Example. | |
*/ | |
namespace Drupal\Console\Command\Develop; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; | |
use Symfony\Component\Console\Command\Command; | |
use Drupal\Console\Command\Shared\CommandTrait; | |
use Drupal\Console\Style\DrupalStyle; | |
class ExampleCommand extends Command | |
{ | |
use CommandTrait; | |
/** | |
* {@inheritdoc} | |
*/ | |
protected function configure() | |
{ | |
$this->setName('example'); | |
} | |
/** | |
* {@inheritdoc} | |
*/ | |
protected function interact(InputInterface $input, OutputInterface $output) | |
{ | |
} | |
/** | |
* {@inheritdoc} | |
*/ | |
protected function execute(InputInterface $input, OutputInterface $output) | |
{ | |
$io = new DrupalStyle($input, $output); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Contains \Drupal\Console\Develop\Example. | |
*/ | |
namespace Drupal\Console\Command\Develop; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; | |
use Symfony\Component\Console\Command\Command; | |
use Drupal\Console\Command\Shared\ContainerAwareCommandTrait; | |
use Drupal\Console\Style\DrupalStyle; | |
class ExampleContainerAwareCommand extends Command | |
{ | |
use ContainerAwareCommandTrait; | |
/** | |
* {@inheritdoc} | |
*/ | |
protected function configure() | |
{ | |
$this->setName('example'); | |
} | |
/** | |
* {@inheritdoc} | |
*/ | |
protected function interact(InputInterface $input, OutputInterface $output) | |
{ | |
} | |
/** | |
* {@inheritdoc} | |
*/ | |
protected function execute(InputInterface $input, OutputInterface $output) | |
{ | |
$io = new DrupalStyle($input, $output); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment