1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
extra.php
См. документацию.
1<?php
2
3namespace Bitrix\Catalog\Controller;
4
5use Bitrix\Catalog\Access\ActionDictionary;
6use Bitrix\Catalog\ExtraTable;
7use Bitrix\Main\Error;
8use Bitrix\Main\Result;
9
10final class Extra extends Controller
11{
12 use ListAction; // default listAction realization
13 use GetAction; // default getAction realization
14 use CheckExists; // default implementation of existence check
15
16 //region Actions
17 public function getFieldsAction(): array
18 {
19 return [$this->getServiceItemName() => $this->getViewFields()];
20 }
21
26
31 //endregion
32
33 protected function getEntityTable()
34 {
35 return new ExtraTable();
36 }
37
38 protected function checkModifyPermissionEntity()
39 {
40 $r = new Result();
41
42 if (!$this->accessController->check(ActionDictionary::ACTION_PRODUCT_PRICE_EXTRA_EDIT))
43 {
44 $r->addError($this->getErrorModifyAccessDenied());
45 }
46
47 return $r;
48 }
49
50 protected function checkReadPermissionEntity()
51 {
52 $r = new Result();
53
54 if (
55 !(
56 $this->accessController->check(ActionDictionary::ACTION_CATALOG_READ)
57 || $this->accessController->check(ActionDictionary::ACTION_PRICE_EDIT)
58 || $this->accessController->check(ActionDictionary::ACTION_PRODUCT_PRICE_EXTRA_EDIT)
59 )
60 )
61 {
62 $r->addError($this->getErrorReadAccessDenied());
63 }
64 return $r;
65 }
66
67 protected function getErrorCodeEntityNotExists(): string
68 {
70 }
71}
const EXTRA_TYPE_ENTITY_NOT_EXISTS
Определения errorcode.php:39
checkModifyPermissionEntity()
Определения extra.php:38
checkReadPermissionEntity()
Определения extra.php:50
getErrorCodeEntityNotExists()
Определения extra.php:67
getEntityTable()
Определения extra.php:33
getFieldsAction()
Определения extra.php:17
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
trait CheckExists
Определения checkexists.php:8
trait GetAction
Определения getaction.php:8
trait ListAction
Определения listaction.php:9