13 foreach ($codes as
$code)
15 if (!is_string(
$code))
20 $groupId = $this->getSpaceIdFromCode(
$code, $recipient);
22 if (!is_null($groupId) && $groupId >= 0)
31 private function getSpaceIdFromCode(
string $code, Recepient $recipient): ?int
33 if (str_starts_with(
$code,
'SG'))
35 return $this->getSpaceIdFromGroupCode(
$code);
38 return $this->getSpaceIdFromOrdinaryCode(
$code, $recipient);
41 private function getSpaceIdFromGroupCode(
string $code): ?int
43 $explodedCode = explode(
'_',
$code)[0] ??
'';
44 $groupId = (int)substr($explodedCode, 2);
54 private function getSpaceIdFromOrdinaryCode(
string $code,
Recepient $recipient): ?int
56 if (preg_match(
'/^(U|UA|AU|D|DR|G2)/',
$code) && in_array(
$code, $recipient->getAccessCodes(),
true))
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code