public function InvalidationInterface::setState in Purge 8.3
Set the state of the invalidation.
Setting state on invalidation objects is the responsibility of purgers, as only purgers decide what succeeded and what failed. For this reason a call to ::setStateContext() before the state is set, is obligatory.
Parameters
int $state: One of the following states:
- InvStatesInterface::SUCCEEDED
- InvStatesInterface::FAILED
- InvStatesInterface::PROCESSING
- InvStatesInterface::NOT_SUPPORTED.
Throws
\Drupal\purge\Plugin\Purge\Invalidation\Exception\InvalidStateException Thrown when the $state parameter doesn't match any of the constants defined in \Drupal\purge\Plugin\Purge\Invalidation\InvStatesInterface.
\LogicException Thrown when the state is being set in general context.
1 method overrides InvalidationInterface::setState()
- InvalidationBase::setState in src/
Plugin/ Purge/ Invalidation/ InvalidationBase.php - Set the state of the invalidation.
File
- src/
Plugin/ Purge/ Invalidation/ InvalidationInterface.php, line 90
Class
- InvalidationInterface
- Desribes the invalidation object.
Namespace
Drupal\purge\Plugin\Purge\InvalidationCode
public function setState($state);