Skip to content

Commit f8d1968

Browse files
authored
Add native flag getter
1 parent 28f2f4a commit f8d1968

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Model/Config.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,14 @@ public function __construct(
2929
private SerializerInterface $serializer
3030
) {}
3131

32+
public function isStoreInPath(): bool
33+
{
34+
return $this->scopeConfig->isSetFlag(Store::XML_PATH_STORE_IN_URL);
35+
}
36+
3237
public function isEnabled(): bool
3338
{
34-
return $this->scopeConfig->isSetFlag(Store::XML_PATH_STORE_IN_URL)
39+
return $this->isStoreInPath()
3540
&& ($this->getStorePathType() !== PathType::StoreCode || $this->isUnsetSingleStorePath());
3641
}
3742

0 commit comments

Comments
 (0)