Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
placementdefault.php
1<?php
2
3
5
6
8
9class PlacementDefault extends Base
10{
11 const VIEW_ACTION = 'view_activity';
12
13 public function getType()
14 {
15 return Type::DEFAULT_TOOLBAR;
16 }
17
18 public function getEntityId()
19 {
20 return $this->fields->get('PLACEMENT_OPTIONS')['activity_id'];
21 }
22
23 public function getEntityTypeId()
24 {
25 $type = $this->getAction();
26
27 if($type == static::VIEW_ACTION)
28 {
30 }
31 else
32 {
33 throw new \Bitrix\Main\NotSupportedException("Action AppPlacementType: '".$type."' is not supported in current context");
34 }
35 }
36
37 protected function getAction()
38 {
39 return $this->fields->get('PLACEMENT_OPTIONS')['action'];
40 }
41}