You are here

class TomeSuperCacheRebuildCommand in Tome 8

Contains the tome:super-cache-rebuild command.

Hierarchy

Expanded class hierarchy of TomeSuperCacheRebuildCommand

1 string reference to 'TomeSuperCacheRebuildCommand'
tome_static_super_cache.services.yml in modules/tome_static/modules/tome_static_super_cache/tome_static_super_cache.services.yml
modules/tome_static/modules/tome_static_super_cache/tome_static_super_cache.services.yml
1 service uses TomeSuperCacheRebuildCommand
tome_static_super_cache.cache_rebuild_command in modules/tome_static/modules/tome_static_super_cache/tome_static_super_cache.services.yml
Drupal\tome_static_super_cache\Commands\TomeSuperCacheRebuildCommand

File

modules/tome_static/modules/tome_static_super_cache/src/Commands/TomeSuperCacheRebuildCommand.php, line 13

Namespace

Drupal\tome_static_super_cache\Commands
View source
class TomeSuperCacheRebuildCommand extends CommandBase {

  /**
   * {@inheritdoc}
   */
  protected function configure() {
    $this
      ->setName('tome:super-cache-rebuild')
      ->setAliases([
      'tscr',
    ])
      ->setDescription('Rebuilds cache without conditions.');
  }

  /**
   * {@inheritdoc}
   */
  protected function execute(InputInterface $input, OutputInterface $output) {
    $GLOBALS[SuperStaticCache::FULL_REBUILD_KEY] = TRUE;
    drupal_flush_all_caches();
    $this
      ->io()
      ->success('Full cache rebuild complete.');
  }

}

Members

Namesort descending Modifiers Type Description Overrides
CommandBase::$executable protected property The current executable path.
CommandBase::$io protected property The IO decorator.
CommandBase::initialize protected function
CommandBase::io protected function Returns the IO decorator, for reporting errors. Overrides ProcessTrait::io
ExecutableFinderTrait::findExecutable protected function Finds an executable string for the current process.
ProcessTrait::displayErrors protected function Displays errors using the IO component.
ProcessTrait::runCommand protected function Runs a single command and outputs errors if encountered.
ProcessTrait::runCommands protected function Runs commands with concurrency.
TomeSuperCacheRebuildCommand::configure protected function
TomeSuperCacheRebuildCommand::execute protected function