Same name in other branches
  1. 5.0.x src/Form/OperationsForm.php \Drupal\advagg\Form\OperationsForm::incrementCounter()
  2. 6.0.x src/Form/OperationsForm.php \Drupal\advagg\Form\OperationsForm::incrementCounter()
  3. 8.x-3.x src/Form/OperationsForm.php \Drupal\advagg\Form\OperationsForm::incrementCounter()
  4. 8.x-4.x src/Form/OperationsForm.php \Drupal\advagg\Form\OperationsForm::incrementCounter()

Clear out all advagg cache bins and increment the counter.

Fichier

src/Form/OperationsForm.php, line 368

Classe

OperationsForm
Configure advagg settings for this site.

Namespace

Drupal\advagg\Form

Code

public function incrementCounter() {
    // Clear out the cache and delete aggregates.
    $this->clearAggregates();
    // Increment counter.
    $new_value = $this->config('advagg.settings')
        ->get('global_counter') + 1;
    $this->config('advagg.settings')
        ->set('global_counter', $new_value)
        ->save();
    drupal_set_message($this->t('Global counter is now set to %new_value', [
        '%new_value' => $new_value,
    ]));
}