public function getShadowLocales(ShadowLocaleBehavior $document)
{
$shadowLocales = [];
$locales = $this->getLocales($document);
$node = $this->getNode($document);
foreach ($locales as $locale) {
$shadowEnabledName = $this->encoder->localizedSystemName(ShadowLocaleSubscriber::SHADOW_ENABLED_FIELD, $locale);
$shadowLocaleName = $this->encoder->localizedSystemName(ShadowLocaleSubscriber::SHADOW_LOCALE_FIELD, $locale);
if ($node->getPropertyValueWithDefault($shadowEnabledName, false)) {
$shadowLocales[$node->getPropertyValue($shadowLocaleName)] = $locale;
}
}
return $shadowLocales;
}