Skip to content

Commit

Permalink
Merge b62a43c into 70f3f85
Browse files Browse the repository at this point in the history
  • Loading branch information
Prokyonn committed Apr 17, 2023
2 parents 70f3f85 + b62a43c commit 47f9d03
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions Content/Infrastructure/Sulu/Structure/ContentStructureBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

namespace Sulu\Bundle\ContentBundle\Content\Infrastructure\Sulu\Structure;

use Sulu\Bundle\ContentBundle\Content\Domain\Model\ShadowInterface;
use Sulu\Bundle\ContentBundle\Content\Domain\Model\TemplateInterface;
use Sulu\Component\Content\Compat\Property;
use Sulu\Component\Content\Compat\PropertyInterface;
Expand Down Expand Up @@ -402,23 +403,35 @@ public function getNavContexts(): array
}

/**
* @return string[]
* @return array<string, string>
*/
public function getShadowLocales(): array
{
$content = $this->getContent();
if ($content instanceof ShadowInterface) {
return $content->getShadowLocales() ?? [];
}

return [];
}

/**
* @return mixed|null
*/
public function getShadowBaseLanguage()
public function getShadowBaseLanguage(): ?string
{
$content = $this->getContent();
if ($content instanceof ShadowInterface) {
return $content->getShadowLocale();
}

return null;
}

public function getIsShadow(): bool
{
$content = $this->getContent();
if ($content instanceof ShadowInterface) {
return (bool) $content->getShadowLocale();
}

return false;
}

Expand Down

0 comments on commit 47f9d03

Please sign in to comment.