protected function Subscription::validateState in Feeds 8.3
Validates the state of the subscription.
Throws
\LogicException Thrown if the state of the subscription is invalid.
2 calls to Subscription::validateState()
- Subscription::preSave in src/
Entity/ Subscription.php - Acts on an entity before the presave hook is invoked.
- Subscription::unsubscribe in src/
Entity/ Subscription.php - Unsubscribes from a hub.
File
- src/
Entity/ Subscription.php, line 127
Class
- Subscription
- Defines the subscription entity class.
Namespace
Drupal\feeds\EntityCode
protected function validateState() {
$this
->ensureSecret();
$this
->ensureToken();
if ($this
->validate()
->count()) {
throw new \LogicException('The subscription is invalid.');
}
}