Last active
June 13, 2020 09:29
-
-
Save eS-IT/f894bb3dcd0900f66aade75865f9d6e4 to your computer and use it in GitHub Desktop.
TestOutputCommand
This file contains hidden or 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 | |
namespace Esit\Easyfewo\Classes\Commands; | |
use Contao\CoreBundle\Framework\ContaoFramework; | |
use Symfony\Component\Console\Command\Command; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; | |
use Symfony\Component\Console\Style\SymfonyStyle; | |
class TestOutputCommand extends Command | |
{ | |
protected static $defaultName = 'test:output'; | |
protected $framework; | |
private $io; | |
public function __construct(ContaoFramework $contaoFramework) | |
{ | |
$this->framework = $contaoFramework; | |
parent::__construct(); | |
} | |
protected function configure(): void | |
{ | |
$this->setDescription('Prints a Message to cmd'); | |
} | |
protected function execute(InputInterface $input, OutputInterface $output): ?int | |
{ | |
$this->framework->initialize(); | |
$this->io = new SymfonyStyle($input, $output); | |
// HIER DIE OUTPUT-STATEMENTS EINFÜGEN! | |
return 0; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment