Symfony\Component\Console\Style\SymfonyStyle::warning PHP Method

warning() public method

public warning ( $message )
    public function warning($message)
    {
        $this->block($message, 'WARNING', 'fg=white;bg=red', ' ', true);
    }

Usage Example

Example #1
0
 /**
  * @inheritdoc
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $io = new SymfonyStyle($input, $output);
     $lockHandler = new LockHandler('app:sync.lock');
     if (!$lockHandler->lock()) {
         $io->warning('Sync process already running');
         return;
     }
     $service = $this->getContainer()->get('app.sync');
     switch ($input->getOption('type')) {
         case 'users':
             $service->syncUsers();
             break;
         case 'groups':
             $service->syncGroups();
             break;
         case 'grouphub':
             $service->syncGrouphubGroups();
             break;
         case 'queue':
             $service->syncGrouphubGroupsFromQueue();
             break;
         default:
             $service->sync();
     }
     $io->success('Done!');
 }
All Usage Examples Of Symfony\Component\Console\Style\SymfonyStyle::warning