public function IsNotContentModerationState::onEnqueueCandidateEntity in Acquia Content Hub 8.2
Prevent temporary files from enqueueing.
Parameters
\Drupal\acquia_contenthub_publisher\Event\ContentHubEntityEligibilityEvent $event: The event to determine entity eligibility.
Throws
\Exception
File
- modules/
acquia_contenthub_publisher/ src/ EventSubscriber/ EnqueueEligibility/ IsNotContentModerationState.php, line 32
Class
- IsNotContentModerationState
- Subscribes to entity eligibility to prevent enqueueing temporary files.
Namespace
Drupal\acquia_contenthub_publisher\EventSubscriber\EnqueueEligibilityCode
public function onEnqueueCandidateEntity(ContentHubEntityEligibilityEvent $event) {
// Never export ContentModerationState entities.
$entity = $event
->getEntity();
if ($entity instanceof ContentModerationState) {
$event
->setEligibility(FALSE);
$event
->stopPropagation();
}
}