1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
ValidateEventCategoryUpdate.php
См. документацию.
1<?php
2
3namespace Bitrix\Calendar\OpenEvents\Controller\Filter\EventCategory;
4
5use Bitrix\Calendar\EventCategory\Validator\CommonEventCategoryValidators;
6use Bitrix\Main\Engine\ActionFilter;
7use Bitrix\Main\Event;
8use Bitrix\Main\EventResult;
9
11{
13 {
14 $request = $this->getAction()->getController()->getRequest();
15 $name = $request->get('name');
16 $nameErrors = CommonEventCategoryValidators::validateName($name, false);
17 if ($nameErrors)
18 {
19 array_map(static fn (array $error) => $this->addError($error), $nameErrors);
20 }
21
22 $description = $request->get('description');
23 $descriptionErrors = CommonEventCategoryValidators::validateDescription($description);
24 if ($descriptionErrors)
25 {
26 array_map(static fn (array $error) => $this->addError($error), $descriptionErrors);
27 }
28
29 $closedRaw = $request->get('closed');
30 $closedErrors = CommonEventCategoryValidators::validateClosed($closedRaw);
31 if ($closedErrors)
32 {
33 array_map(static fn (array $error) => $this->addError($error), $closedErrors);
34 }
35 $closed = $request->get('closed') === 'true';
36
37 $attendees = $request->get('attendees') ?? [];
38 $attendeesErrors = CommonEventCategoryValidators::validateAttendees($closed, $attendees);
39 if ($closedErrors)
40 {
41 array_map(static fn (array $error) => $this->addError($error), $attendeesErrors);
42 }
43
44 if ($this->getErrors())
45 {
46 return new EventResult(type: EventResult::ERROR, handler: $this);
47 }
48
49 return null;
50 }
51}
if(!Loader::includeModule('catalog')) if(!AccessController::getCurrent() ->check(ActionDictionary::ACTION_PRICE_EDIT)) if(!check_bitrix_sessid()) $request
Определения catalog_reindex.php:36
addError(Error $error)
Определения base.php:80
Определения event.php:5
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
if(Loader::includeModule( 'bitrix24')) elseif(Loader::includeModule('intranet') &&CIntranetUtils::getPortalZone() !=='ru') $description
Определения .description.php:24
$name
Определения menu_edit.php:35
$event
Определения prolog_after.php:141
$error
Определения subscription_card_product.php:20