private function optionsShouldExcludeDocument($document, array $options = null)
{
if ($options === null) {
return false;
}
$options = array_merge(['exclude_ghost' => true, 'exclude_shadow' => true], $options);
$state = $this->inspector->getLocalizationState($document);
if ($options['exclude_ghost'] && $state == LocalizationState::GHOST) {
return true;
}
if ($options['exclude_ghost'] && $options['exclude_shadow'] && $state == LocalizationState::SHADOW) {
return true;
}
return false;
}