class CacheRebuild in Automatic Updates 8
Cache rebuild command.
Hierarchy
- class \Drupal\automatic_updates\Command\BaseCommand extends \Symfony\Component\Console\Command\Command
- class \Drupal\automatic_updates\Command\CacheRebuild
Expanded class hierarchy of CacheRebuild
File
- src/
Command/ CacheRebuild.php, line 11
Namespace
Drupal\automatic_updates\CommandView source
class CacheRebuild extends BaseCommand {
/**
* {@inheritdoc}
*/
protected function configure() {
parent::configure();
$this
->setName('cache:rebuild')
->setAliases([
'cr, rebuild',
])
->setDescription('Rebuild a Drupal site and clear all its caches.');
}
/**
* {@inheritdoc}
*/
protected function execute(InputInterface $input, OutputInterface $output) {
parent::execute($input, $output);
drupal_flush_all_caches();
$output
->writeln('Cache rebuild complete.');
return 0;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BaseCommand:: |
protected | property | The class loader. | |
BaseCommand:: |
protected | function | Bootstrap Drupal. | |
BaseCommand:: |
public | function | Constructs a new InstallCommand command. | |
CacheRebuild:: |
protected | function |
Configures the current command. Overrides BaseCommand:: |
|
CacheRebuild:: |
protected | function |
Executes the current command. Overrides BaseCommand:: |