1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
AccessCode.php
См. документацию.
1<?php
2
4
5use ArrayAccess;
6use Attribute;
11
12#[Attribute(Attribute::TARGET_PROPERTY)]
14{
16 {
18 if (!is_array($propertyValue) && !is_iterable($propertyValue) && !($propertyValue instanceof ArrayAccess))
19 {
20 $result->addError(new ValidationError(
21 Loc::getMessage('SOCIALNETWORK_VALIDATOR_ACCESS_CODE_INVALID_TYPE'),
22 ));
23
24 return $result;
25 }
26
27 foreach ($propertyValue as $item)
28 {
29 if (!($this->isValidAccessCode($item)))
30 {
31 $result->addError(new ValidationError(
32 Loc::getMessage('SOCIALNETWORK_VALIDATOR_ACCESS_CODE_INVALID_VALUE'),
33 ));
34
35 return $result;
36 }
37 }
38
39 return $result;
40 }
41
42 private function isValidAccessCode(mixed $code): bool
43 {
44 return \Bitrix\Main\Access\AccessCode::isValid($code);
45 }
46}
validateProperty(mixed $propertyValue)
Определения AccessCode.php:15
</td ></tr ></table ></td ></tr ><?endif?><? $propertyIndex=0;foreach( $arGlobalProperties as $propertyCode=> $propertyValue
Определения file_new.php:729
$result
Определения get_property_values.php:14
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения options.php:195